similar to: R-beta: dataframes again

Displaying 20 results from an estimated 8000 matches similar to: "R-beta: dataframes again"

2011 Jan 31
1
How many nested function calls?
Is there a limit to how many nested function calls R will tolerate? I mean, if I have a function that calls another function that calls another function, etc., is there a limit to how deep I can go? I am getting an error that says a variable is not available. When I do a traceback(), it shows that the supposedly missing variable is 7 functions back. I'll call that "fcn1". As far as
2006 Jul 11
1
Table of P values for Fisher's exact test
Hi, I have a table of observed counts for various genetic markers. Instead of doing Fisher's exact test for each marker one at a time and recording the P value manually, is there a script to go through the whole list and generate the P value column automatically? An example of my data: Counts_CHB and Counts_AA are the observed counts for one allele. 2N_CHB and 2N_AA are the total number
1998 Feb 17
2
R-beta: dataframes and function side effects
A non-text attachment was scrubbed... Name: not available Type: text Size: 1091 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/19980217/93056752/attachment.pl
1998 Feb 18
1
R-beta: dataframes and functions
A non-text attachment was scrubbed... Name: not available Type: text Size: 1230 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/19980218/095e19b6/attachment.pl
2014 Aug 10
1
"Fastest" way to merge 300+ .5MB dataframes?
Good afternoon, Today I was working on a practice problem. It was simple, and perhaps even realistic. It looked like this: ? Get a list of all the data files in a directory ? Load each file into a dataframe ? Merge them into a single data frame Because all of the columns were the same, the simplest solution in my mind was to `Reduce' the vector of dataframes with a call to `merge'. That
2007 May 14
2
creating a "list of 3 dataframes" from a "list of 2 dataframes" and a dataframe?
#I wish to create a "list of three dataframes" ("results2") from a "list of two dataframes" (temp) and a dataframe ("c")? #Please advise. a <- data.frame(x=c(1,2,3),y=c(5,7,9)) b <- data.frame(x=c(2,4,7,9),y=c(2,3,5,4)) c <- data.frame(x=c(22,34,7,9),y=c(52,63,5,4)) results1 <- list(a,b,c) #what I want #but this is how I need to get there
2007 Oct 22
3
median value dataframe coming from multiple dataframes
Hi all, I am not a skillful R programmer and has I am handling with large dataframes (about 30000 x 300) I am in need of an efficient function. I have 4 dataframes with the same dimension. I need to generate other dataframe with the some dimension than the others where in each position it has the median value of the 4 values in the same position coming from the 4 dataframes. Grateful by your
2011 May 17
4
subsetting a list of dataframes
Hello All, I have a list of dataframes, and I need to subset it by keeping only those dataframes in the list that meet a certain criterion. Specifically, I need to generate a second list which only includes those dataframes whose number of rows is > 1. Could someone suggest how to do this? I have come close to what I need with loops and such, but there must be a less clumsy way... Many
2011 May 13
2
Creating dataframes
I would like to create a certain number of dataframes out of one dataframe where each of the dataframes is related to a factor. This should be possible with a loop or a function, as is very clumsy to do it manually when there are quite a lot factors. For example having a dataframe called "exmpl": Site Value 1 12 1 15 1 18 1 21 1 12 1 13 2 15 2 12 2 58 2 62 2 22 2 65 2 29 3 21 3 55
2013 Jan 11
2
Merging list of dataframes with reshape merge_all
Hi, I'd like to merge mutliple dataframes from a list of dataframes by some common columns. The approach for simply merging 2 dataframes is working with: merge(df1,df2,by=c("col1","col2","col3"),all=TRUE) For mutliple dataframes in a list I try to use the merge_all command from the package reshape. The documentation states that the command takes a list of
2008 Oct 26
3
Process dataframes from list
Hi all, I have roughly fifty dataframes and a dataframe with the names of the fifty dataframes. I want to perform the same set of manipulations on all fifty dataframes, but can't find a way to batch process from a list with the dataframe names using a loop. Is there a way to read the file names from the dataframe with the names and then call the referenced dataframe? This would save me a
2012 Oct 18
3
bigmemory for dataframes?
Hi Folks, I've been bumping my head against the 4GB limit for 32-bit R. I can't go to 64-bit R due to package compatibility issues (ROBDC - possible but painful, xlsReadWrite - not possible, and others). I have a number of big dataframes whose columns all sorts of data types - factor, character, integer, etc. I run and save models that keep copies of the modeled data inside the model
2007 Oct 01
2
Idioms for empty dataframes
I'm fairly new to R, coming from a programming background -- it's quite nice to work with dataframes, though, as opposed to explicit iteration. One thing I've found, which is surprising is that zero-length dataframes seem to cause errors: > t <- data.frame(bob=c(100)) > order(t$bob) [1] 1 > t1 <- t[t$bob < 50] > order(t1$bob) Error in order(na.last, decreasing,
2012 Sep 24
2
Rows not common in dataframes
Hi, I have two dataframes (Dataframe_A, Dataframe_B) with the same no. of columns. The first column of both the dataframes contains unique names. I wish to have Dataframe_A with the rows that are NOT common to Dataframe_B. With merge (), it is possible to get the common rows or to merge rows, but I am not quite sure how to do it in a simpler way. Any help would be much appreciated. Thank you.
2013 Feb 26
2
merging or joining 2 dataframes: merge, rbind.fill, etc.?
#I want to "merge" or "join" 2 dataframes (df1 & df2) into a 3rd (mydf). I want the 3rd dataframe to contain 1 row for each row in df1 & df2, and all the columns in both df1 & df2. The solution should "work" even if the 2 dataframes are identical, and even if the 2 dataframes do not have the same column names. The rbind.fill function seems to work. For
2009 Dec 07
2
How to apply five lines of code to ten dataframes?
Hello R-helpers, I have 10 dataframes (named data1, data2, ... data10) and I would like to add 5 new columns to each dataframe using the following code: data1$LogDepth<-log10(data1[,2]/data1[,4]) data1$LogArea<-log10(data1[,3]/data1[,5]) data1$p<-2*data1[,6]/data1[,7] data1$Exp<-data1[,2]^(2/data1[,8]) data1$s<-data1[,3]/data1[,9] ...but I would prefer not to repeat this chunk of
2006 Nov 08
2
combining dataframes with different numbers of columns
Dear list members, I have to combine dataframes together. However they contain different numbers of variables. It is possible that all the variables in the dataframe with fewer variables are contained in the dataframe with more variables, though it is not always the case. There are key variables identifying observations. These could be used in a merge statement, although this won't
2011 Feb 23
2
copy values from one dataframes into another
Hello everyone, I have the following problem, I have a dataframes that looks like this: fire$Year fire$Size 1 1981 1738.0 2 1984 2228.1 3 1985 38963.3 4 1986 2223.4 5 1987 3594.6 6 1988 1520.0 ... What I would like to do is copy the values from the fire$Size colum and put it into a new df but with "0" for the years that are missing. The
2012 Jul 26
2
conditional sum two dataframes
I have two data frames. One with a matrix of months and the other with a matrix of values. The two dataframes correspond to each other. I would like to sum up all the values in by month. What would be an efficient way to do this? a=C(2,3,5,2,3,5) b=c(2,6,3,2,6,3) c=c(2,6,7,2,6,5) months <- data.frame(a,b,c) a=C(200,345,5435,27456,3343,555) b=c(288,699,377,234,6354,33454)
2009 Nov 17
3
Perform operations on dataframes called with paste in loops
In a loop, I compose the name of a csv file using paste, then read it (e.g., dataset1.csv, dataset2.csv, etc). The name of the dataframe assigned to the imported csv is also composed with paste (e.g., dataset1, dataset2, etc.). Now I want to perform operations on the dataframes dataset1, dataset2, etc. However, the paste function only renders a string on which I can not, for example, do operations