similar to: list to data frame

Displaying 20 results from an estimated 2000 matches similar to: "list to data frame"

2011 Feb 14
1
conditional value assignment
Dear R-Help, I am trying to compute a new variable, let's call it "target cannon orientation (tco)" based conditionally on old variables, "TargetColor," "CannonOriB," and "CannonOriR." For every case in the data set, if TargetColor is "B" then I want tco to equal the value for that case of CannonOirB, else CannonOriR. I've tried writing
2010 Feb 21
1
tests for measures of influence in regression
influence.measures gives several measures of influence for each observation (Cook's Distance, etc) and actually flags observations that it determines are influential by any of the measures. Looks good! But how does it discriminate between the influential and non- influential observations by each of the measures? Like does it do a Bonferroni-corrected t on the residuals identified by
2010 Mar 06
1
transposing data
Hi. I have repeated measures data of the form where each observation is a trial, and trials are grouped by subject, and variables encode whatever level of a factor was present during that trial, and the dependent variable is response time (RT). I want to transpose the data to a form suitable for MANOVA such that there is one observation per subject and RT is recoded across many
2011 Apr 07
2
replace an expression with its value, or read macros
I know my subject line seems odd, but I want to replace an expression—such as a variable—with its value. For example, I want to paste() some strings together, assign the result to a variable s, then use the value of s as a variable to hold another value. Something like this: import_subjects <- function (start, iterations) { for (i in 1:iterations) { # iterate from start to end s <-
2010 Aug 27
3
predict.loess and NA/NaN values
Hi! In a current project, I am fitting loess models to subsets of data in order to use the loess predicitons for normalization (similar to what is done in many microarray analyses). While working on this I ran into a problem when I tried to predict from the loess models and the data contained NAs or NaNs. I tracked down the problem to the fact that predict.loess will not return a value at all
2011 Apr 13
5
Clearing Console; of weeks of codes!
Dear All: I do see I have weeks of codes in my console when I check with my arrow up keys. I have been clearing them with Control L but it seems to clear it clear the screen temporally. I do see the previous codes again when I open R the next day, after quitting the session! Q: How do I clear this? Thanks; YA -- View this message in context:
2012 Apr 09
2
return one vector that is the sum of a list of vectors
Dear R Help, I am attempting to write a function that takes a list of variable groups and a vector of numbers (e.g., "jtsv" would indicate one group of variables, "jtsv1", "jtsv2", etc, each of which name a variable in a data frame), and returns a list of variable group sums. For example, given list("jtsv", "ptsv") and c(1:10), where jtsv1, etc,
2011 Apr 08
3
xyplot, groups and colors
Dear ExpeRts, I am trying to plot a bunch of growth curves and would like to get some more control over groups and line colors than I seem to have. Example: # make some data dat <- Orange dat$group <- ifelse(dat$Tree%in%c('1','4','5'), 'A', 'B') # plot xyplot(circumference~age, dat, groups=group) # now use lines to make the growth curve more
2011 Mar 08
4
beamer overlays with Sweave?
This may be asking too much, but I'm wondering if anyone has a solution (even a hack) for creating multiple (overlay) plots in an Sweave file and post-processing the overlays in beamer appropriately. For example, suppose I have a series of figure blocks in my .Rnw file: <<plot1,fig=TRUE>>= [stuff] @ <<plot2,fig=TRUE>>= [stuff] @ <<plot3,fig=TRUE>>=
2010 Aug 05
6
64-bit R on 64-bit Windows box... Still not enough memory?!
I have a 64-bit windows box - Intel Xeon CPU E7340 @ 2.4GHz 31.9GB of RAM I have R 2.11.1 (64bit) running on it. My csv data is 3.6 GB (with about 15 million obs, 120 variables.) ------------------------------------------------ I have successfully imported the data above into R. No problem. Now I am trying to run 'rpart' on my data. But I got the following error : Error: cannot
2015 Jul 30
2
POSIX-Share fails with NFS-mounts
Hi there, I'm sure this must have been discussed before, but I can't find anything that addresses exactly my problem in the archives. The problem I ran into is, that a samba-share relying on POSIX file-permissions stops working as soon as the shared folder is a NFS-mount itself. In that case, it is no longer possible for any user to access files or folders. So in my example, if
2008 Feb 08
2
R version of SAS Proc Varclus
I am interested in finding an R version of SAS "Proc Varclus". SAS's Proc Varclus implements an oblique cluster analysis based on principal components. How can I find out if R has a package that runs the same algorithm implemented in SAS "Proc Varclus"? Thank you, Mary Helen Black __________________________ Mary Helen Black, M.S. Keck School of Medicine of USC
2006 Jul 31
2
math symbols and text with mtext()
Dear R users, Two questions: 1) Is there a way to simplify the mtext() line below ? beta=c(1,-1) m=5 plot(1) mtext( bquote(paste( beta == .(paste( "(", paste(beta, collapse=", "), ")" )) )), outer=TRUE,line=-3) 2) How do I get the embedded carriage return "\n" below to work, i.e for the text that follows it to appear on the next line? beta=c(1,-1) m=5
2011 Apr 27
1
read.table: fill=T for header?
Dear ExpeRts,t I am trying to read tab delimted data produced by somewhat brain dead software that seems to think it's a good idea to have an extra tab character after the last column - except for the header line. As explained in the help page, read.delim now assumes that the first column contains the row.names (which is not even wrong) but now and all col.names get shiftet by one column.
2011 Mar 29
7
Using graphics straight from R into published articles
Hi, I have been working with R for the past couple of years; analyzing data and producing some graphics. I was just wondering if people use graphics from R straight into articles or are they always edited in some way; fonts, headers, axis, color etc? Using photoshop or some other programs? I would like to think it is possible, better and more profession to do it all in R. I tried google and
2011 Apr 19
5
Simple Missing cases Function
Dear all I have written a function to perform a very simple but useful task which I do regularly. It is designed to show how many values are missing from each variable in a data.frame. In its current form it works but is slow because I have used several loops to achieve this simple task. Can anyone see a more efficient way to get the same results? Or is there existing function which does
2011 Mar 25
4
read.xls -> rotate data.frame
Hi to all, how could I to rotate automatically a data sheet which was imported by read.xls? x1 x2 x3 .... xn y1 1 4 7 ... xn/y1 y2 2 5 8 .... xn/y2 y3 3 6 9 ....xn/y2 yn ... ... ... Xn/Yn to y1 y2 y3 .... yn x1 1 2 3 ..... Yn/x1 x2 4 5 6 .... Yn/x2 x3 7 8 9 .... Yn/x2 xn ... ... ... ..... Yn/xn Kind regards Knut
2010 Oct 15
1
Help with R
Dear Sir/Madam; I'm not sure whether this is the correct contact for help. I've been recently working with R on my project, unfortunately It sudenly crashes! It gives me the following message: "FATAL ERROR: unable to restore saved data in .RDATA" I decided to uninstall the copy (a R2.11.0) and installed a new version (2.11.1) but I'm still receiving the same message. When I
2010 Oct 23
1
Change column of numbers in data frame to days
Hello, I have seen a few posts about changing a vector of numbers to days of the week where the numbers are 1-7. I have a similar problem with a twist. I have a vector of numbers ranging form 20 to 500. The numbers represent days since a starting point. The list is not consecutive, some numbers skipped and some numbers duplicated. I know day 1 was a Monday. I want to use this vector in a lm
2010 Nov 24
4
shifting down ylab in a plot
Hi guys, I am trying to shift down the "ylab" of my plot but can't find how to do it. I tried to tune "mar" but it enable more room for the labels to be displayed but it does not move to "ylab" as I would like. Is there a way with "par" to shift down my "ylab" ?? Cheers -- View this message in context: