similar to: how to merge these dataframes

Displaying 20 results from an estimated 10000 matches similar to: "how to merge these dataframes"

2004 Oct 15
2
combine many .csv files into a single file/data frame
Dear R users, I have a few hundred .csv files which I need to put together (full outer joins on a common variable) to do a factor analysis. Each file may contain anywhere from a few hundred to a few thousand rows. What would be the most efficient way to do this in R? Please include some sample code if applicable. Thank you, b.
2006 Jun 07
2
help with combination problem
hello: I have 3 data.frame objects. First df object: Of dim (149,31). Columns 2:31 are marked as T1..T14 and N1..N16. Name T1 T2 N1 T3 N2 N3 N4 T4 mu1 10 10 9 10 9 9 8 10 mu2 11 11 9 11 9 9 9 11 ... muN 12 12 9 11 9 9 8 12 Second df object: of Dim (50000,31). Columns 2:31 are maked as T1...T14 and N1..N16.
2010 Mar 05
3
How to match vector with a list ?
Dear list, I have a vector of characters and a list of two named elements : i <- c("a","a","b","b","b","c","c","d") j <- list(j1 = c("a","c"), j2 = c("b","d")) I'm looking for a fast way to obtain a vector with names, as follows : [1] "j1" "j1"
2009 Jul 30
4
edit.row.names taking row names from the edited dataframe
Hi all, I am struggling to work out how to use the rownames from an edited dataframe rather than the row names from the original dataframe. In my data set i'm trying to extract several rows of data on particular individuals, i don't doubt i'm using the long way round but what i have in the way of a script is this: ##selecting the IDs from the dataframe individually
2004 Nov 04
3
keep dimension of a sub matrix
Hi, is there any way to keep a sub matrix dimension? exemple : i1<-1; i2<-1 j1<-2; j2<-3; ret <-matrix(1,4,4)[i1:i2,j1:j2] ; dim(ret) is NULL because the submatrix single col or single row is coerce to a vector automaticaly. How can i bypass this cast : submatrix->vector ??????? Thank you. --------------------------------- [[alternative HTML version
2016 Sep 17
7
Benchmark LNT weird thread behaviour
Hi James/Chris, You guys have done this before, so I'm guessing you can help me understand what's going on. If my buildbot config is: jobs=2, nt_flags=['--cflag', '-mcpu=cortex-a15', '--use-perf', '--threads=1', '--build-threads=4'] It uses -j4 for build, -j2 for running the tests:
2008 Sep 16
1
Car.proper C[] matrix
I am hoping someone can help translate some WinBUGS code into R code. I would like to use R to create the C[] matrix required for a car.proper model in WinBUGS, but I am having a difficult time negotiating the coding. The C matrix provides normalized weights for each pair of spatial areas. So the WinBUGS example is as follows: # of the weight matrix with elements Cij. The first J1 elements
2007 Mar 09
1
Applying some equations over all unique combinations of 4 variables
#I have a data set that looks like this. A bit more complicated actually with # three factor levels but these calculations need to be done on one factor at a #I then have a set of different rates that are applied #to it. #dataset cata <- c( 1,1,6,1,1,2) catb <- c( 1,2,3,4,5,6) doga <- c(3,5,3,6,4, 0) data1 <- data.frame(cata, catb, doga) rm(cata,catb,doga) data1 # start rates #
2002 Feb 22
3
Cent. Mov. Ave
Dear R People: Here is an interesting question(I think) Suppose I want to calculate Centered Moving Averages; i.e. x[1] <- ( sum(y[1:12]) )/12 x[2] <- ( sum(y[2:13]) )/12 and so on. Of course, this is easily done through loops. However, I have been trying to do this more elegantly, but have failed. I have tried things like j1 <- 1:109 j2 <- 12:120 x[1:109] <- ( sum( y[j1:j2])
2004 Nov 24
1
I just got my TDM22B - but no data sheet
I just got my TDM22B, but the package did not include anything else, like datasheet. 1. Where can I download it? 2. Which outlets are FXS/FXO ??? (depending on the green /red card positions) 3. Does it need the extra power?? bye Ronald
2004 Aug 17
0
can this work?
Hi. I''m newie using LARTC. I have some pc''s and one 512/192kbits conection. I do not want that one PC uses all the bandwidth available. I made this script to limit, but I need that the applications (web browsing, messenger with cam and audo , p2p, etc) in pc''s continue acceding normally Internet. Would work this script? what type of qdisc could be added to htb in
2015 Jan 20
6
[LLVMdev] Basic AliasAnalysis: Can GEPs with the same base but different constant indices into a struct alias?
Hi all, This is covered by (struct-path aware) TBAA, but BasicAA disagrees. See the attached testcase, where it prevents us from removing the redundant load. For arbitrary GEPs, we can't decide based on constant indices (because of e.g., &A[0][1] and &A[1][0], with *A a one-element array). BasicAA has some logic to "try to distinguish something like &A[i][1] against
2001 Apr 15
2
data manipulation in R
Dear List: I have a data manipulation problem that I was unable to solve in R. I did it in SQL, and it may be that the solution in R is to do it in SQL, but I wondered if people could imagine a vector-based solution. Imagine a list A[i] of observers who observe some set of events B[j]. Each observer i may observe one or more events, and each event j may have been observed by one or more
2017 Jun 01
3
Reversing one dimension of an array, in a generalized case
Here is an alternative approach using apply(). Note that with apply() you are reversing rows or columns not indices of rows or columns so apply(junk, 2, rev) reverses the values in each column not the column indices. We actually need to use rev() on everything but the index we are interested in reversing: f2 <- function(a, wh) { dims <- seq_len(length(dim(a))) dims <-
2011 Oct 06
3
Wide to long form conversion
I have some data 'myData' in wide form (attached at the end), and would like to convert it to long form. I wish to have five variables in the result: 1) Subj: factor 2) Group: between-subjects factor (2 levels: s / w) 3) Reference: within-subject factor (2 levels: Me / She) 4) F: within-subject factor (2 levels: F1 / F2) 5) J: within-subject factor (2 levels: J1 / J2) As this is the
2017 Jun 01
0
Reversing one dimension of an array, in a generalized case
?? > z <- array(1:24,dim=2:4) > all.equal(f(z,3),f2(z,3)) [1] "Attributes: < Component ?dim?: Mean relative difference: 0.4444444 >" [2] "Mean relative difference: 0.6109091" In fact, > dim(f(z,3)) [1] 2 3 4 > dim(f2(z,3)) [1] 3 4 2 Have I made some sort of stupid error here? Or have I misunderstood what was wanted? Cheers, Bert Bert Gunter
2005 May 30
3
sapply following using by with a list of factors
Background: OS: Linux Mandrake 10.1 release: R 2.0.0 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 --------------------------------- Colleagues I am having some trouble extracting results from the function by, used to average variables in a data.frame first by one factor (depth) and then by a second factor (station). The real data.frame is quite large > dim(data.2001) [1] 32049 11 Here is a
2011 Aug 31
2
Classifying values by interval
Greetings All! As is often the case on this list, the answer may well be under my nose but I can't see it! I am looking for a "smart" way to do the following. Say I have a vector of values, X. I set up bins" for X, say with breaks at B = c(b1,b2,...,b11) covering the range of X, i.e. bins numbered 1:10. The value x is in bin i if B[i] < x <= B[i+1] What I seek is a
2012 Feb 15
2
[LLVMdev] Performance problems with FORTRAN allocatable arrays
I've noticed that LLVM does a bad job of optimizing array indexing code for FORTRAN arrays declared using the ALLOCATABLE keyword. For example if you have something like the following: DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:,:) :: QAV ... ALLOCATE( QAV( -2:IMAX+2,-2:JMAX+2,-2:KMAX+2,ND) ) ... DO L = 1, 5 DO K = K1, K2 DO J = J1, J2 DO I = I1, I2 II = I +
2013 May 24
0
[LLVMdev] Thumb call relocation for the Runtime dynamic linker (RuntimeDyldELF.cpp)
Hi Jonas, > here is a patch to add Thumb call relocation to the dynamic linker. I would be happy if you could commit it to the SVN. Thanks very much for working on this. It looks like a good starting-point, but there are a couple of issues with the patch at the moment. First, it only handles RelValue up to 22 bits (depending on how you count) in size. But on ARMv6T2 onwards the J1 and J2