楼主: cbw1243
44334 504

[问答] 接受各种R语言难题   [推广有奖]

301
沉默的忧伤 发表于 2016-8-25 11:22:35
大神,请问安装R语言包提示需要一个命名空间是什么情况?
> install.packages("~/pinktoe_2.0.tar.gz", repos = NULL, type = "source")
Installing package into ‘/home/hehe/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
* installing *source* package ‘pinktoe’ ...
ERROR: a 'NAMESPACE' file is required
* removing ‘/home/hehe/R/x86_64-pc-linux-gnu-library/3.3/pinktoe’
Warning in install.packages :
  installation of package ‘/home/hehe/pinktoe_2.0.tar.gz’ had non-zero exit status

302
58366544 发表于 2016-8-25 12:11:29
你好,我想问一下write.xlsx这个函数
之前可以用它来存4W多行信息,今天用想用它来村60W行的EXCEL的时候,他提示
Error in .jcall(row[[ir]], "Lorg/apache/poi/ss/usermodel/Cell;", "createCell", : java.lang.OutOfMemoryError: GC overhead limit exceeded.
然后我尝试存了几次之后,他的提示变成这样:
Error in .jnew("java/io/FileInputStream", path.expand(file)) :
  Java Exception <no description because toString() failed>.jnew("java/io/FileInputStream", path.expand(file))<S4 object of class "jobjRef">
是不是Java的问题,应该怎么解决?

303
JLOGAN 发表于 2016-8-26 07:57:11 来自手机
cbw1243 发表于 2016-6-26 09:15
暑假漫长,生活没有挑战。在此征集各类R语言疑难杂症,欢迎各位骚扰。
提出给力问题的,将予以100论坛币奖 ...
大神你好,我现在有两个问题比较棘手,有一个数据框,含有26个属性,有数值、字符、因子、日期等类型,其中字符还有中文字符,现在想要进行主成分分析和关联分析,怎么实现,因为很多字符型对于关联分析用不了。还有就是想要对数据框中的每一行数据进行两两比较,得到相匹配的百分比,也就是每个数据的相似度,该怎么实现?求指教

304
Danfeng-Li 发表于 2016-8-26 14:14:18 来自手机
如图,我想做这样的图像拼接,我使用的是par(mfrow=c(3,1))函数,但是出现几个问题:
1,如何使三个图片无缝拼接在一起
2,怎么控制图片的大小
3,我用了mar()函数设置边距,也用了pin()设置图片大小,但是不能达到示例中的格式,会显示图像超过画布的错误,或者出现这样的提示:Error in plot.new() : plot region too large
以下是我的部分代码:
opar<-par(no.readonly = T)
par(mfrow=c(3,1))
par(mar=c(0,24,0,24),mgp=c(1.5, 0.5, 0))
plot(mydata$GDP,mydata$Protein_g,xlim=c(0,8),ylim=c(-4,-1.5),
     pch=21,col=1,bg=mydata$Names,cex=1.5,lwd=2,
     axes=F,xlab=NA,ylab=\"Protein(g)\",font.lab=2)

请问怎样才能实现例子中这样的拼接呢?或者怎么增长画布的长度,问题有点多,谢谢大神 image1.jpg

image0.jpg (26.29 KB)

image0.jpg

305
lisong-1227 学生认证  发表于 2016-8-26 21:09:31
您好,我在用R做中文分词,请问:第一,怎么做词频分析?第二,怎么加入搜狗的细胞语料库?第三,怎么添加字典?谢谢

306
fcfc2013 发表于 2016-8-26 21:42:42
一个关于 “blotter” 包 错误提示问题 ;  不知道你能解答这个问题没有

> b.strategy <- "bFaber"
> initPortf(b.strategy, "ZSYH", initDate = "2007-12-31")   #初始账户
Error in exists(paste("portfolio", name, sep = "."), envir = .blotter,  :
  object '.blotter' not found

307
沉默的忧伤 发表于 2016-8-29 16:53:02
沉默的忧伤 发表于 2016-8-25 11:22
大神,请问安装R语言包提示需要一个命名空间是什么情况?
> install.packages("~/pinktoe_2.0.tar.gz", re ...
已解决

308
runman 发表于 2016-8-29 21:16:20
你好,大神,R里面有一个 np package,包含以下内容,但是还是找不到 “半参数变系数分位数回归”啊?想请教一下,半参数变系数分位数回归的程序有现成的吗?谢谢啦^_^

Abstract :We describe the R np package via a series of applications that may be of interest to applied econometricians. The np package implements a variety of nonparametric and semiparametric kernel-based estimators that are popular among econometricians. There are also procedures for nonparametric tests of signi cance and consistent model speci- cation tests for parametric mean regression models and parametric quantile regression models, among others. The np package focuses on kernel methods appropriate for the mix of continuous, discrete, and categorical data often found in applied settings. Data-driven methods of bandwidth selection are emphasized throughout, though we caution the user that data-driven bandwidth selection methods can be computationally demanding.

Image 1.jpg (423.98 KB)

Image 1.jpg

309
cbq95229 发表于 2016-9-9 16:39:11
楼主,有没有爬取过sbml文件,或者推荐的连接

310
xiaocao003 发表于 2016-9-9 23:00:50
条件 数据 计算公式
偶是R新手,麻烦大神看下,在R中有条件和数据两个文件,如何实现截图公式的计算。多谢!

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-31 19:55