similar to: Merging data.frames

Displaying 20 results from an estimated 1000 matches similar to: "Merging data.frames"

2012 Sep 07
6
splitting character vectors into multiple vectors using strsplit
Hi folks, Suppose I create the character vector charvec by > charvec<-c("a1.b1","a2.b2") > charvec [1] "a1.b1" "a2.b2" and then I use strsplit on charvec as follows: > splitlist<-strsplit(charvec,split=".",fixed=TRUE) > splitlist [[1]] [1] "a1" "b1" [[2]] [1] "a2" "b2" I was wondering
2018 Feb 12
2
[parallel] fixes load balancing of parLapplyLB
Dear R-Devel List, **TL;DR:** The function **parLapplyLB** of the parallel package has [reportedly][1] (see also attached RRD output) not been doing its job, i.e. not actually balancing the load. My colleague Dirk Sarpe and I found the cause of the problem and we also have a patch to fix it (attached). A similar fix has also been provided [here][2]. [1]:
2018 Feb 19
2
[parallel] fixes load balancing of parLapplyLB
Hi, I'm trying to understand the rationale for your proposed amount of splitting and more precisely why that one is THE one. If I put labels on your example numbers in one of your previous post: nbrOfElements <- 97 nbrOfWorkers <- 5 With these, there are two extremes in how you can split up the processing in chunks such that all workers are utilized: (A) Each worker, called
2018 Feb 26
2
[parallel] fixes load balancing of parLapplyLB
Dear Christian and Henrik, thank you for spotting the problem and suggestions for a fix. We'll probably add a chunk.size argument to parLapplyLB and parLapply to follow OpenMP terminology, which has already been an inspiration for the present code (parLapply already implements static scheduling via internal function staticClusterApply, yet with a fixed chunk size; parLapplyLB already
2010 Feb 10
2
Subscripting
Dataframe1 contains a list of specific dates. Dataframe2 contains a large dataset, one element of which is Date. How do I create a subset of Dataframe2 that excludes the dates from Dataframe1? I know how to do it with a left outer join vs null in SQL, but I can't figure out how to do it more directly via the subcripts that already exist? Dateframe1 Date 1/1/2010 1/18/2010 Dataframe2 Date
2009 Aug 06
1
problem with recording numeric output into another dataframe
dear all, I have two dataframes dataframe1 ID a b c dataframe2 ID value a;W 100 X;c 200 Y;Z 300 I wanted to match the IDs from the two dataframes and record the values into a new column of dataframe1 at the corresponding rows. This is what I expect: dataframe1 ID value a 100 b c 200 I tried doing it like this: for (i in seq(1:nrow(dataframe1))) {
2010 Oct 04
1
Splitting a DF into rows according to a column
Hi, I'm turning my wheels on this and keep coming around to the same wrong solution - please have a look and give a hand ... The premise is: a DF like so > loremIpsum <- "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque leo ipsum, ultricies scelerisque volutpat non, volutpat et nulla. Curabitur consequat ullamcorper tellus id imperdiet. Duis semper malesuada
2008 Oct 22
3
Substitute problem
hello R users, I didn't find a solution for a special problem. I have two dataframes. dataframe1: X value row col ID 1 8.973498062 5512625 3460000 1 2 11.656658570 5501625 3464000 2 3 11.121777570 5495625 3473000 3 4 9.310465964 5508625 3477000 4 5 8.883483845 5515625 3496000 5 dataframe2: X value
2009 Nov 10
3
creating multiple plots using a splitting factor
Hello, I am new to R. I often collect data at multiple sites and need to create separate graphs (such as scatterplots or histograms) of specific variables for each site. I have tried to do this by splitting the data frame and then using lapply, but it seems that the graphing commands cannot be called as functions. Here is a sample of my data, called "seeddist2": site
2006 Mar 17
1
"renaming" dataframe1 using "column" names from dataframe2?
I have a dataframe named ?temp?, and another dataframe named ?descriptions?. I wish to ?rename? temp, and to ?call? it the names of a certain column in the dataframe ?descriptions?. Is there a good way to do this? A similar question: I am using a ?for loop? to create several new dataframes. e.g. for(j in 1:9){ .. I?d like each dataframe to be named d1, d2, d3, with the number being tied to
2011 Jun 14
1
[Resolved] combine the data frames into comma separated list.
Hi Thanks Gabor for your suggestion. I am posting the code that worked for me. dataframe1 = data.frame(cbind(Src = c(1,1,1,2,3), Target1 = c('aaa','bbb','ccc','aaa','ddd'))); #must be data frame dataframe2 = data.frame(cbind(Src = c(2,3,4,4,4), Target2 = c('aaaa','dddd','bbbb','eeee','ffff'))); dataframe3 =
2018 Mar 11
4
subsetting comparison problem
Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4...... CN R1 0 1 0 1 R2 1 0 1 1 R3
2010 Mar 26
2
DISPLAYING TABLE in file
Hi, I wish to NEATLY store, and later display one table per file (similar to capabilities of write.table()). BUT BY NEATLY I MEAN: 1. Column Headings right aligned with data values. 2. Decimal points line-up per column. 3. Data values padded trailing zeros per column (if not integers). 4. "Tricky" formats such as certain characters/dates possibly chosen by the user? bla bla bla I do
2018 Mar 12
0
subsetting comparison problem
> On Mar 11, 2018, at 3:32 PM, Neha Aggarwal <aggarwalneha2000 at gmail.com> wrote: > > Hello All, > I am facing a unique problem and am unable to find any help in R help pages > or online. I will appreciate your help for the following problem: > I have 2 data-frames, samples below and there is an expected output > > R Dataframe1: > C1 C2
2008 Oct 27
3
Arrays of Trellis plots
hello, the example below does not work. (i know it's not supposed, but it makes it clear what i'm trying to achieve) par(mfrow=c(2,1)) xyplot(y~x2|x1,data=dataframe1,pch=20) xyplot(y~x2|x1,data=dataframe2,pch=20) i know i could probably merge the two datasets and do something like xyplot(y~x2|x1+dataset,data=merged) any other suggestion? thanks. [[alternative HTML version deleted]]
2013 Jan 25
2
How to name the elements of list
HI, I have the array list: X<-vector("list", 2) X[[1]] : data frame 1 X[[2]]: dataframe2 now i want to change index 1 and 2 into: "0-10" , "11-20" ,. finally I want to have X[["0-10"]]:dataframe1 X[["11-20"]]:dataframe2 how do I get them? Thanks a lot. Kind regards, Tammy [[alternative HTML version deleted]]
2018 Mar 15
2
clusterApply arguments
Thank you for your answer! I agree with you except for the 3 (Error) example and I realize now I should have started with that in the explanation. >From my point of view parLapply(cl = clu, X = 1:2, fun = fun, c = 1) shouldn't give an error. This could be easily avoided by using all the argument names in the custerApply call of parLapply which means changing, parLapply <-
2011 Oct 20
1
stop R from rounding
Hello, I have a column in a data frame that need to be 10 digits long. As such: Decimal.Year 1 1994.25997 2 1994.26020 However, R keeps rounding the digits. As such: Decimal.Year 1 1994.260 2 1994.260 *Is there any way to stop this from happening?* Here is how I created the data frame: x <- read.table('bats_1994_CTD.txt') colnames(x) <-
2002 Apr 30
1
data.frame package?
Is there a library that is able for example to 1. merge 2 dataframes by row eg.: rbind(dataframe1, dataframe2):data.frame 2. delete a column from a dataframe del(dataframe, colname) or del(dataframe, colindex= 1):data.frame? 3. Select lines from a dataframe by a specific function ? select(dataframe, func=small(x){x<1}, colindex=3): data.frame? 4. converting all double columns of a data.frame
2018 Mar 15
1
clusterApply arguments
On 03/15/2018 05:25 PM, Henrik Bengtsson wrote: > On Thu, Mar 15, 2018 at 3:39 AM, <FlorianSchwendinger at gmx.at> wrote: >> Thank you for your answer! >> I agree with you except for the 3 (Error) example and >> I realize now I should have started with that in the explanation. >> >> From my point of view >> parLapply(cl = clu, X = 1:2, fun = fun, c =