在R中的RSSA包中绘制50多个组件

时间:2018-06-28 08:20:48

标签: r svd

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 
    if let nestedTableViewCell = tableView.cellForRow(at: indexPath) as? NestedTableViewCell {
        let heightNestedTableView = nestedTableViewCell.nestedTableView.contentsize.height
        return heightNestedTableView
    } else {
        return 0
    } }

以上代码仅产生前50个组件的图形。我需要绘制50多个组件

我尝试了

require(Rssa)
t=ssa(co2,200) #200 here should be the number of components
plot(t)       # this way it plots only the first 50 not 200!

但是没有用!

示例:类似于这种情况 accessing eigenvalues in RSSA package in R

1 个答案:

答案 0 :(得分:1)

?ssa的帮助页面上,我们看到一个名为neig的参数,其记录为;

  

整数,所需本征三倍数。如果为“ NULL”,则将使用默认的默认值,请参见“详细信息”

将其用作命名参数:

 t=ssa(co2, neig=200) 
 plot(t)

enter image description here

并且:

> t$sigma
  [1] 78886.190749   329.031810   327.198387   184.659743    88.695271    88.191805    52.380502
  [8]    40.527875    31.329930    29.409384    27.157698    22.334446    17.237926    14.175096
 [15]    14.111402    12.976716    12.943775    12.216524    11.830642    11.614243    11.226010
 [22]    10.457529    10.435998  snipped the remaining 200 numbers.

(显然,软件包作者并不认为200是要使用的“合理”数字,尽管查看neig = 50和neig-200的结果值,我看不到第50个特征值的可分辨切点。但是...他们必须在我已向您展示如何访问的代码中进行设置。)