similar to: type of object of a variable in a data frame

Displaying 20 results from an estimated 20000 matches similar to: "type of object of a variable in a data frame"

2008 Apr 09
1
vectorized way to combine levels of a factor
Hi Gurus: If I have a large dataset of the form of: > x <- data.frame(V1 = runif(10), V2 = sample(c('A','B','C'),10,T)) > x V1 V21 0.2691580 A2 0.8711267 B3 0.2674728 C4 0.3278876 A5 0.1809152 A6 0.2499651 C7 0.9155174 A8 0.8004974 B9 0.7885516 A10 0.9301630 A And I want a V3 that =V2 if V2=A, and =D if V2=B or C. In other words I
2008 Mar 06
2
extracting a percentage of data by random
Hello Gurus: If I have a dataframe with one of the variables called "age" for example, and I want to extract a random 10% of the observations from each "age" group of the entire data frame. Do I have to double loop to split the data and then loop again to assign random numbers? Or is there a better way to do this? Thanks! Karen
2008 Feb 14
1
deleting certain observations in a data frame
Hi, I'm wondering what the fastest way is to delete certain data points (observations) in a data frame. I have a vector of the indices/row.names I would like to delete. I have tried replacing list by list, but it always complains about different lengths, "replacing list of length a with length b" and so on. Another way to think of it is that it's a generazation of na.rm I
2010 Apr 19
3
nls for piecewise linear regression not converging to least square
Hi R experts, I'm trying to use nls() for a piecewise linear regression with the first slope constrained to 0. There are 10 data points and when it does converge the second slope is almost always over estimated for some reason. I have many sets of these 10-point datasets that I need to do. The following segment of code is an example, and sorry for the overly precise numbers, they are just
2008 Mar 13
1
survival curve for only certain values of a factor
Hello: Using the built-in dataset aml as an example: data(aml) If I use instead dummy variables: aml$x1 = (aml$x=="maintained")aml$x2 = (aml$x=="unmaintained") and I want to plot the survival curve using x1, x2, and I just want the 2 levels, rather than 4 curves from: fit <- survfit(Surv(time, status) ~ x1+x2, data=aml) plot(fit) I guess because there are 2 levels
2010 Apr 19
2
nls minimum factor error
Hi, I have a small dataset that I'm fitting a segmented regression using nls on. I get a step below minimum factor error, which I presume is because residual sum of square is still "not small enough" when steps in the parameter space is already below specified/default value. However, when I look at the trace, the convergence seems to have been reached. I initially thought I might
2008 May 12
1
what kind of residuals are the ones calculated in coxph?
Hi Gurus: In the coxph() objects in Survival package, there is an attribute called residuals. Usually, there are several kinds for censored survival data. I can't seem to find in the documentation as to which one this is calculating. Anyone knows? Karen _________________________________________________________________ [[alternative HTML version deleted]]
2008 Mar 11
1
levels() function for a vector
Hello: I'm trying to use levels function, but I don't know why it's returning NULL. For example: > temp[1] 3 5 5 NA> levels(temp)NULL> Also, I've tried: > list(temp)[[1]][1] "3" "5" "5" NA > levels(list(temp))NULL Is there a specific requirement on the parameter? Karen
2016 Jun 14
3
Double variable expansion / multiple password mechanisms
Hi, Trying to solve the problem of supporting multiple auth mechanisms + proxy and really don't want to store user passwords in plain test and fine to do master user to backend. I had the crazy thought I could do something like the following: For each user Store supported password schemes as LDAP attributes: userPasswordCRAM-MD5: {CRAM-MD5}xxx userPasswordDIGEST-MD5: {DIGEST-MD5}xxxx
2002 Apr 11
1
rsync : old file dates generating error during nfs rsync session: Value Too large for defined data type
I was troubleshooting a problem we were having with some files not rsyncing properly over an nfs mount (the destination device is a snapserver (NAS) that did not have native ability to receive streaming rsync info, that's why we were doing this rsync over an NFS connection to the snapserver). Anyway, at first I thought this was just one of the quirks of the snapserver (it isn't
2005 Feb 19
16
Snom phone hint exten question
Hi, I am sorry to be asking this but the wiki is down and has been for a couple of days and I need to get this working before Monday to get my live system setup. Trying to get the Snom 190's and soon to arrive 3com 3102's to use the function keys and for the life of me I can't work it out from the conversations on the archive what I am going exactly wrong here? The snom 190 with
2005 Jun 28
1
enhanced multidimensional scaling?
Dear R list Would anyone be able to tell me whether it is possible to do "enhanced multidimensional scaling" (enhanced MDS) in R? In other words, something that goes beyond "cmdscale" by iteratively improving the fit between observed dissimilarities and inter-object distances, using the KYST algorithm (Kruskal, 1964). I have found several implementations of non-metric MDS
2004 Dec 10
3
R Reference Card (especially useful for Newbies)
Newbies (and others!) may find the R Reference Card made available by Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf useful. It categorizes and organizes a bunch of R's (S's) basic, most used functions so that they can be easily found. For example, paste() is under the "Strings" heading and expand.grid() is under "Data Creation." For newbies
2005 Jul 27
4
R Reference Card (especially useful for Newbies)
Newbies (and others!) may find useful the R Reference Card made available by Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf or through the "Contributed" link on CRAN (where some other reference cards are also linked). It categorizes and organizes a bunch of R's basic, most used functions so that they can be easily found. For example, paste() is under the
2002 Jun 11
1
NT user name doesn't match unix username when winbindd is runnin g
Samba team, I posted the following message on May 30 to comp.protocols.smb, but no one has responded to the posting as of yet, so I thought I'd try this email list. We are testing winbind and security=domain to authenticate NT users on our UNIX box in samba (v2.2.3a). Winbind is working correctly. Wbinfo shows users as domainname+username (we are using "+" as the
2003 Apr 21
2
randomForest crash?
I am attempting to use randomForests to look for interesting genes in microarray data with 216genes, 2 classes and 52 samples. My data.frame is 52x217 with the last column, V217 being the class(1 or 2). When I try lung.rf <- randomForest(V217 ~ ., data=tlSA216cda, importance= TRUE, proximity = TRUE) the GUI crashes. I am running R-1.6.2 under windo$e98, and most
2010 Aug 17
4
replacing values in a vector
Dear helpRs Does anyone have an elegant way of doing the following: For a given numeric vector, e.g. vec <- c(3,2,6,4,7) Create a series of vectors where all but 1 of the values are replaced by 0's, e.g. vec.a <- c(3,0,0,0,0) vec.b <- c(0,2,0,0,0) vec.c <- c(0,0,6,0,0) vec.d <- c(0,0,0,4,0) vec.e <- c(0,0,0,0,7) I have looked at `replace', but can't think of a
2010 Jun 22
1
help in pael data analysis
I need help in typing step by step commands in R software for panel data analysis saibaba
1999 Aug 26
1
error bars on barplots
Hello again I'm trying to put error bars onto a barplot. I've tried something that Bill Simpson suggested a while ago, ie: x<-c(1,2,3,4,5) y<-c(1.1, 2.3, 3.0, 3.9, 5.1) ucl<-c(1.3, 2.4, 3.5, 4.1, 5.3) lcl<-c(.9, 1.8, 2.7, 3.8, 5.0) plot(x,y, ylim=range(c(lcl,ucl))) arrows(x,ucl,x,lcl,length=.05,angle=90,code=3) #or segments(x,ucl,x,lcl) but I can't get it to work on a
2008 Feb 26
3
R package to perform Horn's parallel analysis
I am seeking information on whether anyone has written code to perform Horn's parallel analysis (a procedure that informs the selection of the proper number of components in PCA) in R. Thank you in advance for any help you can provide. Please respond off-list at the email address below. Karen Douglas ******************************************************************* Karen Douglas,