这里还有其他问题可以解决同一个问题,但我没有意识到如何在此基础上解决我的问题.所以,我有5个数据帧,我想使用rbind合并一个唯一数据框中的行,但它返回错误:
"错误row.names<-.data.frame(*tmp*,值=值):'row.names'重复不允许另外:警告消息:设置'row.names'时的非唯一值:'1','10','100','1000 ','10000','100000','1000000','1000001 [....]"
数据框具有相同的列但行数不同.我认为rbind命令将第一列作为row.names.因此尝试在五个数据框中放置一个顺序ID,但它不起作用.我试图通过row.names()在数据框中指定顺序行名,但也没有成功.合并命令不是我认为的选项,因为5个数据帧和连续的合并将覆盖先例.我只使用id创建了一个新数据框并试图加入,但结果数据框不会附加连接df的列.
关注df 1的摘录:
id image power value pol class
1 1 tsx_sm_hh 0.1834515 -7.364787 hh FR
2 2 tsx_sm_hh 0.1834515 -7.364787 hh FR
3 3 tsx_sm_hh 0.1991938 -7.007242 hh FR
4 4 tsx_sm_hh 0.1991938 -7.007242 hh FR
5 5 tsx_sm_hh 0.2079365 -6.820693 hh FR
6 6 tsx_sm_hh 0.2079365 -6.820693 hh FR
[...]
1802124 1802124 tsx_sm_hh 0.1991938 -7.007242 hh FR
Run Code Online (Sandbox Code Playgroud)
另外四个df是相同的结构,除了'id'列之外没有重复的数字.'pol'和'image'列定义为级别.并all.pol <- rbind(df1,df2,df3,df4,df5)返回row.names重复的此错误.
任何的想法?
提前致谢
我在MRO 3.3.1平台中安装rJava软件包时遇到问题:平台:x86_64-pc-linux-gnu(Ubuntu 16.04LTS 64位)(以下错误消息)。
在报告了其他几个问题之后,我安装了java-8-openjdk-*,java-8-oracle,liblzma-dev等。我也尝试通过“ conda install”安装rJava,但它存储在/ anaconda3目录中,我不知道如何将其用于MRO。
有一些线索吗?
* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 …Run Code Online (Sandbox Code Playgroud)