search for: dflist

Displaying 11 results from an estimated 11 matches for "dflist".

Did you mean: flist
2013 Nov 01
1
Package(s) for making waffle plot-like figures?
...;58", "59", "60", "61", "62", "63", "64", "65")) Inspired by a statexchange post, I am using these scripts to make the plots : library(ggplot2) col4=c('#E66101','#FDB863','#B2ABD2','#5E3C99') dflist=list() for (i in 1:37){ residue_num=length(which(df$position==i)) dflist[[i]]=df[df$position==i,2:3] waffle=expand.grid(y=1:residue_num,x=seq_len(ceiling(sum(dflist[[i]]$ratio)/residue_num))) residuevec=rep(dflist[[i]]$residue,dflist[[i]]$ratio) waffle$residue=c(as.vector(residuevec),rep(NA,nrow(wa...
2011 Jan 17
2
Summing data frame columns on identical data
Dear all, I have 9 data frames, and I'm simply trying to sum the values of column 3 (on a row-by-row basis). However, there are a slightly different number of rows in each data frame, so I'm receiving the following error: "Error in Ops.data.frame(mrunoff_207101[3], mrunoff_207102[3]) : ? + only defined for equally-sized data frames". Here is what I'm attempting to do:
2007 Sep 21
1
Help create a loopto conduct multiple pairwise operations
#Hello, #I have three data frames, X,Y and Z with two columns each and different numbers of rows. # creation of data frame X X.alleles <- c(1,5,6,7,8) X.Freq <- c(0.35, 0.15, 0.05 , 0.10, 0.35) Loc1 <- cbind( X.alleles,X.Freq) X <- data.frame(Loc1) #creation of data frame Y Y.alleles <- c(1,4,6,8) Y.Freq <- c(0.35, 0.35, 0.10, 0.20 )
2006 Dec 01
3
Make many barplot into one plot
Dear all, ## I have 4 tables like this: satu <- array(c(5,15,20,68,29,54,84,119), dim=c(2,4), dimnames=list(c("Negative", "Positive"), c("Black", "Brown", "Red", "Blond"))) dua <- array(c(50,105,30,8,29,25,84,9), dim=c(2,4), dimnames=list(c("Negative", "Positive"),
2009 Nov 02
1
Using processed objects as arguments of a function
Dear R users, I wish to utilise processed and saved objects as arguments of a function. Specifically, I have created objects using *"assign"* & *"paste"* functions with an incremental index i, the names of the objects are: fund1, fund2, fund3,....., fund80,..... (where the numerical value increments according to the index i & class of these objects are
2012 Jun 14
1
merge many files together using R
I have hundreds of text files which has data like a data frame with three columns.The column names are same in all the files.I need to merge all files into a single big file. My files are like this file1 "new.col" "ppm.p." "freq.p." "1_3_diaminopropane" 3.13859 5.67516 "1_3_diaminopropane" 3.137 6.65388 "1_3_diaminopropane" 3.13541 8.0142
2016 Apr 14
3
Unequal column lengths
Hello, I?ve tried several times to learn R, but have never gotten past a particular gate. My data are organized by column in Excel, with column headers in the first row. The columns are of unequal lengths. I export them as CSV, then import the CSV file into R. I wish to summarize the data by column. R inserts NA for missing values, then refuses to operate on columns with NA. R is importing
2018 Jan 18
0
Web scraping different levels of a website
...a page at http://catalog.ihsn.org/index.php/catalog#_r=&collection=&country=&dtype=&from=1890&page=1&ps=100&sid=&sk=&sort_by=nation&sort_order=&to=2017&topic=&view=s&vk= From this url, I have built up a dataframe through the following code: dflist <- map(.x = 1:417, .f = function(x) { Sys.sleep(5) url <- ("http://catalog.ihsn.org/index.php/catalog#_r=&collection=&country=&dtype=&from=1890&page=1&ps=100&sid=&sk=&sort_by=nation&sort_order=&to=2017&topic=&view=s&vk=") rea...
2010 Jan 02
3
Help needed on applying a function across different data sets and aggregating the results into a single data set
Hi folks, Wish y'all a Happy New Year 2010! I need some help with the following: Say I have lots of data sets, on which I have to apply a certain function on the same set of columns in each of the data set. Let's take, for ex, the typical data set is: df1 <- as.data.frame(cbind(rnorm(10),rnorm(10))) names(df1)[1] <- "A" names(df1)[2] <- "B" There are many
2018 May 10
2
using for loop with data frames.
Hi, Is it possible use a loop to process many data frames in the same way? For example, if I have three data frames, all with same variables df_bs_id1 <- read.csv("test1.csv",header =TRUE) df_bs_id2 <- read.csv("test2.csv",header =TRUE) df_bs_id3 <- read.csv("test3.csv",header =TRUE) How could I would implement a code loop that , for instance, would
2009 Mar 21
5
macro in a loop
Hi there, Thanks for your time in advance. I am trying to read in multiple files. For example, data.1940 <- read.table("c:/data/1940.csv",header=TRUE,sep=",") data.1950 <- read.table("c:/data/1950.csv",header=TRUE,sep=",") data.1960 <- read.table("c:/data/1960.csv",header=TRUE,sep=",") How can I write a loop to read the