Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在R中访问RSSA包中的特征值_R_Svd_Eigenvalue - Fatal编程技术网

在R中访问RSSA包中的特征值

在R中访问RSSA包中的特征值,r,svd,eigenvalue,R,Svd,Eigenvalue,我在R中使用RSSA包,我需要访问特征值 使用以下代码,我可以绘制组件。但是,我需要以数字的形式访问所有特征值 require(Rssa) t=ssa(co2) plot(t) 我对这个包裹几乎一无所知。我从上下文中得出,您需要在该图形的y轴上绘制的值。由于缺少可复制的示例,我转到?ssa帮助页面并使用第一个示例: > s <- ssa(co2) > > plot(s) 谢谢你的评论,请用CO2替换x,我已经这样做了。我对你问题的其余部分解释正确了吗?你能帮我一下吗

我在R中使用RSSA包,我需要访问特征值

使用以下代码,我可以绘制组件。但是,我需要以数字的形式访问所有特征值

require(Rssa)
t=ssa(co2)
plot(t)

我对这个包裹几乎一无所知。我从上下文中得出,您需要在该图形的y轴上绘制的值。由于缺少可复制的示例,我转到
?ssa
帮助页面并使用第一个示例:

> s <- ssa(co2)
> 
> plot(s)

谢谢你的评论,请用CO2替换x,我已经这样做了。我对你问题的其余部分解释正确了吗?你能帮我一下吗
> getAnywhere(plot.ssa)
A single object matching ‘plot.ssa’ was found
It was found in the following places
  registered S3 method for plot from namespace Rssa
  namespace:Rssa
with value

function (x, type = c("values", "vectors", "paired", "series", 
    "wcor"), ..., vectors = c("eigen", "factor"), plot.contrib = TRUE, 
    numvalues = nsigma(x), numvectors = min(nsigma(x), 10), idx = 1:numvectors, 
    idy, groups) 
{
    type <- match.arg(type)
    vectors <- match.arg(vectors)
    if (identical(type, "values")) {
        .plot.ssa.values(x, ..., numvalues = numvalues)
    }
    else if (identical(type, "vectors")) {
        .plot.ssa.vectors(x, ..., what = vectors, plot.contrib = plot.contrib, 
            idx = idx)
    }
    else if (identical(type, "paired")) {
        if (missing(idy)) 
            idy <- idx + 1
        .plot.ssa.paired(x, ..., what = vectors, plot.contrib = plot.contrib, 
            idx = idx, idy = idy)
    }
    else if (identical(type, "series")) {
        if (missing(groups)) 
            groups <- as.list(1:min(nsigma(x), nu(x)))
        .plot.ssa.series(x, ..., groups = groups)
    }
    else if (identical(type, "wcor")) {
        if (missing(groups)) 
            groups <- as.list(1:min(nsigma(x), nu(x)))
        plot(wcor(x, groups = groups), ...)
    }
    else {
        stop("Unsupported type of SSA plot!")
    }
}
<environment: namespace:Rssa>
> getAnywhere(.plot.ssa.values)
A single object matching ‘.plot.ssa.values’ was found
It was found in the following places
  namespace:Rssa
with value

function (x, ..., numvalues, plot.type = "b") 
{
    dots <- list(...)
    d <- data.frame(A = 1:numvalues, B = x$sigma[1:numvalues])
    dots <- .defaults(dots, type = plot.type, xlab = "Index", 
        ylab = "norms", main = "Component norms", grid = TRUE, 
        scales = list(y = list(log = TRUE)), par.settings = list(plot.symbol = list(pch = 20)))
    do.call("xyplot", c(list(x = B ~ A, data = d, ssaobj = x), 
        dots))
}
<environment: namespace:Rssa>
s$sigma
 [1] 78886.190749   329.031810   327.198387   184.659743    88.695271    88.191805
 [7]    52.380502    40.527875    31.329930    29.409384    27.157698    22.334446
[13]    17.237926    14.175096    14.111402    12.976716    12.943775    12.216524
[19]    11.830642    11.614243    11.226010    10.457529    10.435998     9.774000
[25]     9.710220     9.046872     8.995923     8.928725     8.809155     8.548962
[31]     8.358872     7.699094     7.266915     7.243014     7.164837     6.203210
[37]     6.085105     6.064150     6.035110     6.028446     5.845783     5.808865
[43]     5.770708     5.753422     5.680897     5.672330     5.650324     5.612606
[49]     5.599314     5.572931