Displaying 20 results from an estimated 2000 matches similar to: "duplicate 'row.names' are not allowed"
2006 Feb 26
1
assigning differences in a loop
Dear All
I would need to generate differences between variates such as
nam1<-nam2-nam3 in the following loop:
for(i in c("13","26","38")) {
for (j in c("HR","PQ","QRS","QT")){
nam1<-paste("d",j,i,sep="")
nam2<-paste(j,i,sep=".")
2009 Jun 08
5
mean
Hi,
I have gote the following data
x1 <- c(rep(1,6),rep(4,7),rep(6,10))
x2 <- rnorm(length(x1),6,1)
data <- data.frame(x1,x2)
and I would like to compute the mean of the x2 for each individual of x1, i. e. x1=1,4 and 6?
Thank you very much in advance,
Amori
[[alternative HTML version deleted]]
2017 Jun 04
2
Warning from reshape2 when melting a data frame with uneven number of columns.
Here is a small reproducible example:
data <-
structure(list(V1 = structure(1:3, .Label = c("Name1", "Name2",
"Name3"), class = "factor"), V2 = structure(c(1L, 3L, 2L), .Label =
c("nam1",
"name-1", "name_12"), class = "factor"), V3 = structure(1:3, .Label =
c("nam2",
"nam_34",
2005 Oct 06
1
Compare two distance matrices
Hi all,
I am trying to compare two distance matrices with R. I would like to
create a XY plot of these matrices and do some linear regression on
it. But, I am a bit new to R, so i have a few questions (I searched in
the documentation with no success).
The first problem is loading a distance matrix into R. This matrix is
the output of a the Phylip program Protdist and lookes like this:
5
2009 Jul 23
3
Counter
Hi everyone,
Is there any counter function in R for the following purpose:
x <- matrix(c(1,1,0,2,1,0,0,2,0,1,2,1,2,1,0,1),nrow=4)
As I would like to know how many zeros, ones, and twos in each row of x?
Many thank in advance,
Amor
[[alternative HTML version deleted]]
2012 Oct 29
2
naming datasubsets in a loop
Hello everbody,
I want to generate different subsets of my data-set and safe this
subsets with names listet in a vector. Because in reality I have got
about 70 subsets I want to realize this in a loop
Somehow like this:
names=c("nam1",
2009 May 27
2
boxplot
Hi gues,
Is there any function in R for boxplot with different time points?
t1 <- c(rep(1,20),rep(2,20))
t2 <- c(rep(1,10),rep(2,10),rep(1,10),rep(2,10))
x <- rnorm(40,5,1)
dat <- data.frame(t1,t2,x)
boxplot(x~t1,t2)
Many thanks,
Amor
[[alternative HTML version deleted]]
2009 May 12
2
SAS PROC SORT nodupkey
Hi,
I have the following data and I would like to delete douple names, it is almost similar to SAS PROC SORT nodupkey! Is there any function in R does this?
x1 <- rnorm(11,5,1)
x2 <- runif(11,0,1)
nam <-paste("A", c(1:4,4,5:9,9), sep=".")
mydata <- data.frame(x1,x2)
crownames(mydata) <- nam
Many thanks in advance,
Amor
[[alternative HTML version
2008 Aug 22
4
swap
Hello everybody,
I wonder if there is any swap function in R that does the following:
x <- seq(1,10,12)
x1 <- swap(x)
x1
1 8 3 4 5 6 7 2 10
Thank you very much!
Amor
__________________________________________________
Schutz gegen Massenmails.
[[alternative HTML version deleted]]
2001 Sep 17
2
vorbis´Ô ¾È³çÇϼ¼¿ä
Untitled Document Áö¿ªÀ» °ü¸®ÇÏ½Ç ÁÖºÎÆÀÀåÀ» ÃʺùÇÕ´Ï´Ù !
´ç»ç´Â ±èÄ¡³ÃÀå°í Àü¹®À¯Åë¾÷ü·Î¼
°¢ Áö¿ªÀ» °ü¸®ÇÏ½Ç ÁÖºÎÆÀÀå´ÔÀ» ¸ð½Ê´Ï´Ù
ÇöÀç ±èÄ¡³ÃÀå°í º¸±ÞÀ²Àº ´ëµµ½Ã°¡ 25%,Áö¹æÀº 15% ¼öÁØ¿¡ ºÒ°ú
ÇÏÁö¸¸ À̹ø³âµµ ºÎÅÍ ¸¹Àº ÆǸÅÁõ°¡·Î ÀÎÇØ ³â°£ ÆǸŴë¼ö°¡ ÀÌ¹Ì TV³ª ³ÃÀå°í¿¡ À°¹ÚÇÏ°í ÀÖÀ¸¸ç ¾ÕÀ¸·Î ´õ¿í ´õ ¸¹Àº ÁֺεéÀÌ ±èÄ¡³ÃÀå°í¸¦ ±¸ÀÔ ÇÒ °ÍÀ¸·Î ¿¹»óµÇ°í ÀÖ½À´Ï´Ù.
2007 Jun 28
3
Function call within a function.
I am trying to call a funtion within another function
and I clearly am misunderstanding what I should do.
Below is a simple example.
I know lstfun works on its own but I cannot seem to
figure out how to get it to work within ukn. Basically
I need to create the variable "nts". I have probably
missed something simple in the Intro or FAQ.
Any help would be much appreciated.
EXAMPLE
2009 Jun 17
2
djustment values not defined
Hello,
I am using
mod1 <- lrm(y~x1+x2,na.action=na.pass,method="lrm.fit")
summary(mod1)
and I've got the following error:
Error in summary.Design(mod1) : adjustment values not defined here or with datadist for x1 x2
Many thank,
Amor
[[alternative HTML version deleted]]
2010 Aug 04
6
applying strsplit to a whole column
I am sorry, I'd like to split my column ("names") such that all the
beginning of a string ("X..") is gone and only the rest of the text is
left.
x<-data.frame(names=c("X..aba","X..abb","X..abc","X..abd"))
x$names<-as.character(x$names)
(x)
str(x)
Can't figure out how to apply strsplit in this situation - without
using a
2013 Apr 25
2
connecting matrices
Dear Elisa,
Try this:
el<- matrix(1:100,ncol=20)
?set.seed(25)
?el1<- matrix(sample(1:100,20,replace=TRUE),ncol=1)
In the example you showed, there were no column names.?
?list(el[,sort(el1)[1:3]],sort(el1,index.return=TRUE)$ix[1:3])
#[[1]]
?# ?? [,1] [,2] [,3]
#[1,]?? 31?? 61?? 71
#[2,]?? 32?? 62?? 72
#[3,]?? 33?? 63?? 73
#[4,]?? 34?? 64?? 74
#[5,]?? 35?? 65?? 75
#
#[[2]]
#[1] 9 5 3
A.K.
2011 Mar 26
2
bug in xen 4.1 install on suse 11.4 (xencommons)
List,
here''s how I got 4.1 up on suse 11.4
There is a small bug with the xencommons init script preventing xenstored from starting.
Add this repo for 4.1 RPM''s
-------------
zypper ar http://download.opensuse.org/repositories/Virtualization/openSUSE_11.4 Virt
zypper ref
zypper in xen-4.1.0_01-106.1
Fix the xen inits (observe the order here)
------------
chkconfig -s
2017 Jun 04
0
Warning from reshape2 when melting a data frame with uneven number of columns.
Is this the solution?
> d1<- as.data.frame(lapply(data,as.character),stringsAsFactors=FALSE)
> str(d1)
'data.frame': 3 obs. of 5 variables:
$ V1: chr "Name1" "Name2" "Name3"
$ V2: chr "nam1" "name_12" "name-1"
$ V3: chr "nam2" "nam_34" "name-2"
$ V4: chr "nam3"
2012 Oct 10
7
multiple t-tests across similar variable names
Hi everyone-
I have a dataset with multiple "pre" and "post" variables I want to compare. The variables are named "apple_pre" or "pre_banana" with the corresponding post variables named "apple_post" or "post_banana". The variables are in no particular order.
apple_pre orange_pre orange_post pre_banana apple_post post_banana
person_1
2013 Apr 15
3
Indices of lowest values in matrix
Dear R users,Sorry for such a basic question. I really need to know that how can i pick the indices of 5 lowest values from each row of a matrix with dimensions 12*12??Thank you very much in advance
Elisa
[[alternative HTML version deleted]]
2017 Jun 04
0
Warning from reshape2 when melting a data frame with uneven number of columns.
I am not really sure what the warning means but I think your underlying problem is that all your variables are factors. Did you intend the values in each variable to be character?
data.frame':??? 3 obs. of? 5 variables:
?$ V1: Factor w/ 3 levels "Name1","Name2",..: 1 2 3
?$ V2: Factor w/ 3 levels "nam1","name-1",..: 1 3 2
?$ V3: Factor w/ 3 levels
2001 Sep 17
0
vorbis-dev´Ô ¾È³çÇϼ¼¿ä
Untitled Document Áö¿ªÀ» °ü¸®ÇÏ½Ç ÁÖºÎÆÀÀåÀ» ÃʺùÇÕ´Ï´Ù !
´ç»ç´Â ±èÄ¡³ÃÀå°í Àü¹®À¯Åë¾÷ü·Î¼
°¢ Áö¿ªÀ» °ü¸®ÇÏ½Ç ÁÖºÎÆÀÀå´ÔÀ» ¸ð½Ê´Ï´Ù
ÇöÀç ±èÄ¡³ÃÀå°í º¸±ÞÀ²Àº ´ëµµ½Ã°¡ 25%,Áö¹æÀº 15% ¼öÁØ¿¡ ºÒ°ú
ÇÏÁö¸¸ À̹ø³âµµ ºÎÅÍ ¸¹Àº ÆǸÅÁõ°¡·Î ÀÎÇØ ³â°£ ÆǸŴë¼ö°¡ ÀÌ¹Ì TV³ª ³ÃÀå°í¿¡ À°¹ÚÇÏ°í ÀÖÀ¸¸ç ¾ÕÀ¸·Î ´õ¿í ´õ ¸¹Àº ÁֺεéÀÌ ±èÄ¡³ÃÀå°í¸¦ ±¸ÀÔ ÇÒ °ÍÀ¸·Î ¿¹»óµÇ°í ÀÖ½À´Ï´Ù.