2017-04-19 7 views
0

私はRの森のプロットを作成することに問題があります。私はエラーメッセージ(prFpConvertMultidimArray(平均)のエラーを表示し続ける:Sorryは自動的に上限/下限を識別することはできませんでした)どの境界もこれを参照しています、とにかく私は境界を自分で設定できますか?私のコードは、以下である:prFpConvertMultidimArray(mean)のエラー:申し訳ありませんが自動的に上下の境界を識別するために管理していません。

cochrane_meta<-structure(list(mean= c(-0.96, -0.3194, -0.2443, 0.3619, -0.412, -0.0859, 0.121, 0.096, -0.02, -0.01), lower= c(-0.969, -0.421, -0.387, 0.178, -0.489, -0.29, -0.461, -0.48, -0.104, -0.098), upper= c(-0.949, -0.209, -0.089, 0.521, -0.328, 0.126, 0.63, 0.614, 0.064, 0.078)), .Names= c("mean", "lower", "upper"), row.names= c(NA, -11L), class= "data.frame") 

tabletext<-cbind(c("", "Study Reference", "WOS:000176556700011", "WOS:000184899600023", "ZOOR13400031947", "WOS:000332479400108", "ZOOR11900034495", "WOS:000243735000023", "WOS:000182080900010 (2)", "WOS:000182080900010", "WOS:000334339000135", "WOS:000334339000135 (2)", NA, "Mean Effect Size"), c("Sample Number", "n", "250", "275", "154", "100", "411", "88", "13", "13", "547", "493", NA, NA), c("Effect Size", "r", "-0.96", "-0.3194", "-0.2443", "0.3619", "-0.412", "-0.0859", "0.121", "0.096", "-0.02", "-0.01", NA, "-0.14727")) 

forestplot(tabletext、cochrane_meta、NEW_PAGE = TRUE、is.summary = Cの(TRUE、TRUE、REP)(、)10、FALSE TRUE、クリップ= Cの(-1.00,1.00 )、= "royalblue"、行= "DARKBLUE"、要約= "royalblue"))xlogの= TRUE、COL = fpColors(ボックス

私はこのコードのCIの上限を設定してみてください:

forestplot(tabletext, 
     cochrane_meta, new_page = TRUE, 
     is.summary=c(TRUE, TRUE, rep(FALSE,10),TRUE), 
     clip=c(-1.00,1.00), 
     xlog=TRUE, 
     upper = 1.0, lower = -1.0, 
     col=fpColors(box="royalblue",line="darkblue", summary="royalblue")) 

エラーメッセージが表示されます。

Error in forestplot.default(tabletext, cochrane_meta, new_page = TRUE, : 

平均と下限には無効な列数が含まれています。平均列:3下限列:上列:

これは初めての投稿です。それ以上の情報が必要な場合はお知らせください。ありがとうございました!

答えて

1

いくつかのエラーが発生しました。

まず:そのために

Error in prFpConvertMultidimArray(mean) : Sorry did not manage to automatically identify the upper/lower boundaries. 

私は、パッケージの一例として、オブジェクトをremaned:

cochrane_meta <- data.frame(
    coef = c(-0.96, -0.3194, -0.2443, 0.3619, -0.412, -0.0859, 0.121, 0.096, -0.02, -0.01), 
    low = c(-0.969, -0.421, -0.387, 0.178, -0.489, -0.29, -0.461, -0.48, -0.104, -0.098), 
    high = c(-0.949, -0.209, -0.089, 0.521, -0.328, 0.126, 0.63, 0.614, 0.064, 0.078)) 

第二:

Error in forestplot.default(tabletext, cochrane_meta, new_page = TRUE, : 

All argument values (mean, lower, upper, zero, grid and clip) should be provided as exponentials when using the log scale. This is an intentional break with the original forestplot function in order to simplify other arguments such as ticks, clips, and more. 

修正のために、それは私がプロットパラメータを変更:

forestplot(tabletext, cochrane_meta, new_page = TRUE, 
      is.summary=c(TRUE, TRUE, rep(FALSE,10),TRUE), 
      clip=c(-1.00,1.00), xlog=F, 
      col=fpColors(box="royalblue",line="darkblue", summary="royalblue")) 

サード:

Error in forestplot.default(tabletext, cochrane_meta, new_page = TRUE, : 
    You have provided 10 rows in your mean arguement while the labels have 14 rows 

そして、私はあなたのtable.textオブジェクト内の一部の行を削除:

tabletext<-cbind(c("WOS:000176556700011", "WOS:000184899600023", "ZOOR13400031947", "WOS:000332479400108", "ZOOR11900034495", "WOS:000243735000023", "WOS:000182080900010 (2)", "WOS:000182080900010", "WOS:000334339000135", "WOS:000334339000135 (2)"), 
        c("250", "275", "154", "100", "411", "88", "13", "13", "547", "493"), 
        c("-0.96", "-0.3194", "-0.2443", "0.3619", "-0.412", "-0.0859", "0.121", "0.096", "-0.02", "-0.01")) 

は、最後にプロットはように動作します

forestplot(tabletext, cochrane_meta, new_page = TRUE, 
      is.summary=c(TRUE, TRUE, rep(FALSE,10),TRUE), 
      clip=c(-1.00,1.00), xlog=F, 
      col=fpColors(box="royalblue",line="darkblue", summary="royalblue")) 

そして、これは私の結果である  this

役に立つと便利だよ

+0

私は間違ったところに頭を浮かべるようにうまく働いた。ありがとうございました! – Joseph

関連する問題