Displaying 20 results from an estimated 100 matches similar to: "assigning differences in a loop"
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",
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",
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"
2009 Apr 28
8
duplicate 'row.names' are not allowed
Hi everyone,
I have got the following problem:
x1 <- rnorm(10,5,1)
x2 <- runif(10,0,1)
nam1 <- paste("A",1:4,sep=".")
nam2 <- paste("A",6:9,sep=".")
nam <- c(nam1,"A.4",nam2,"A.9")
mydata <- data.frame(x1,x2)
rownames(mydata) <- nam
Error in `row.names<-.data.frame`(`*tmp*`, value = c("A.1",
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
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
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
2011 Dec 07
1
removing specified length of text after a period in dataframe of char's
Dear all,
I'm trying to remove some text after the period (a decimal point) in
the data frame 'hi', below. This is one step in formatting a table. So
I would like e.g.
"2.0" to become "2"
and "5.3" to be "5.3",
where the variable digordered contains the number of digits after the
decimal that I would like to display, in the same order in which
2012 Mar 19
1
car/MANOVA question
Dear colleagues,
I had a question wrt the car package. How do I evaluate whether a
simpler multivariate regression model is adequate?
For instance, I do the following:
ami <- read.table(file =
"http://www.public.iastate.edu/~maitra/stat501/datasets/amitriptyline.dat",
col.names=c("TCAD", "drug", "gender", "antidepressant","PR",
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
2003 Sep 24
1
partial matching in data frame subscripting
I'm not sure if the following is a bug or a feature:
> jjmat <- array(1:6, c(2,3), list(c('ABC', 'DEF'), c('xyz', 'tuv',
'qrs')))
> jjdf <- as.data.frame(jjmat)
> jjmat['AB', ]
Error: subscript out of bounds
> jjdf['AB',]
xyz tuv qrs
ABC 1 3 5
> jjmat[, 'tu']
Error: subscript out of bounds
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
2012 Oct 22
6
How to use tapply with more than one variables grouped
I'm studying alone the R language for data preparation. I found a course at
MIT for data preparation that uses python but I'm using R to learning. The
first exercise is the preparation of data from a database that shows the
contributions made to candidates for U.S. president. The database is
described in FORMART
2012 Jul 12
2
How to get all list item to one string variable
Hi,
How to get all list item to one string variable.
example
a[1]="abc"
b[1]="def"
output="abc def"
Thanks
B.Purushothaman
--
View this message in context: http://r.789695.n4.nabble.com/How-to-get-all-list-item-to-one-string-variable-tp4636283.html
Sent from the R help mailing list archive at Nabble.com.
2006 Jul 31
3
Great R documentation
Dear all,
I'm trying to improve the documentation I provide my R packages, and
to that end I'd like to find out what you think is great R
documentation. I'm particularly interested in function documentation,
but great vignettes, websites or book are also of interest.
What is your favourite bit of R documentation, and why?
Thanks,
Hadley
2008 Sep 29
0
Script for dose proportionality assessment using power model and confidence interval criteria
Dear R-Helpers
Has anyone written a script for the dose proportionality assessement
using the power model and the confidence interval criteria as described
in
- Gough at al. Assessment of dose proportionality: report from the
statisticians in the pharmaceutical industry in Drug Information
Journal,1995, 29:1039-1048 and/or
- Smith et al. Confidence interval criteria for assessment of dose
2006 Mar 31
0
get_md4pw: Workstation PC-WINSIC$: no account in domain
hello to all
i use a samba server (3.0.14a) PDC which makes the users and computers
authentication on a LDAP server (openldap on debian sarge) (people
branch and computers branch)..
does somebody had this problem? when a user connects from a PC which is
in a windows domain, the authentication doesn't succeed for the
following reason
the error message is (translated from french message
2000 Feb 14
1
Question about permissions and roaming profiles
Hi,
Just a short question : Is it possible to NOT have the profiles
directory used for the roaming profiles shares ([profiles]) in unix mode
777 ? Because it is a bit annoying when unix users have access to the
samba server providing a 777 space ?
Thanks in advance,
--
G?rard MILHAUD
?cole Sup?rieure d'Ing?nieurs de Luminy (ESIL)
Luminy - Case 925 - 13288 Marseille Cedex 09
T?l.: 04
2003 May 16
1
make buildworld fails when upgrading to 4.8 stable : SUITE
OK, It works if I modify my make.conf to not build openss[lh] like it :
#MAKE_KERBEROS5= yes
# TEST
NO_OPENSSH= true # do not build OpenSSH
NO_OPENSSL= true # do not build OpenSSL (implies NO_OPENSSH)
Maybe I install openss[hl] as ports after... But I'm not satisfied with
this way...
--
G?rard MILHAUD
?cole Sup?rieure d'Ing?nieurs de Luminy (ESIL)
Luminy - Case 925 -
2003 May 16
1
Help please : make buildworld fails when upgrading to 4.8 stable
Hi,
I can't build the world. I have an error in SSL, with today cvs
sources. Here is the error :
/usr/src/secure/lib/libssl/../../../crypto/openssl/ssl/bio_ssl.c: In
function `ssl_read':
/usr/src/secure/lib/libssl/../../../crypto/openssl/ssl/bio_ssl.c:209:
`SSL_ERROR_WANT_ACCEPT' undeclared (first use in this function)