similar to: merging data.frames of different length

Displaying 20 results from an estimated 5000 matches similar to: "merging data.frames of different length"

2004 Oct 05
2
correct my method of estimating mean of two POSIXlt data frames
Hello, I searched the archives but could not come to a solution. I have to two columns of information t_start_cdt looks like: > t_start_cdt[1:4] [1] "2003-07-09 11:02:25" "2003-07-09 11:10:25" "2003-07-09 11:30:25" [4] "2003-07-09 12:00:25" > class(t_start_cdt) [1] "POSIXt" "POSIXlt" t_end_cdt looks like: > t_end_cdt[1:4]
2017 Sep 26
2
Surprising message "Error in FUN(newX[, i], ...) : all arguments must have the same length"
I am hitting an odd message "Error in FUN(newX[, i], ...) : all arguments must have the same length". I can't supply the data as it's a huge data frame but I think this has enough diagnostic information to show the issue. I am sure I am missing something obvious. I've put some extra comments in but otherwise this is cut and pasted from Rstudio. ### I wanted a table of the
2017 Sep 26
0
Surprising message "Error in FUN(newX[, i], ...) : all arguments must have the same length"
Hi Chris, Maybe the na.rm=TRUE is affecting things. Try this apply(datTAF[,75:78],2,function(x){ sum(!is.na(x)) }) HTH, Eric On Tue, Sep 26, 2017 at 9:53 AM, Chris Evans <chrishold at psyctc.org> wrote: > I am hitting an odd message "Error in FUN(newX[, i], ...) : all arguments > must have the same length". I can't supply the data as it's a huge data > frame
2008 Dec 07
1
Compile Packages on vista
Hi I''m trying to compile R packages on my vista (I''m very new on vista...). I installed Rtools, RExcel on a specific folder: c:\Rtools and gave full access. Unfortunately, I am still unable to compile any packages (may be still because of the security properties of vista). I checked several mailing list/forums/website but I did not found any solution. Does anybody have the
2018 Feb 23
4
change location of temporary files
I would like to change where R stores the temporary files to my external hard drive in my iMac. This is important because the temporary files R creates are huge and I do not have enough available space in my internal HD. Again, this is for macOS. This change has to be temporary. Later I need to use the usual location for temp files in the internal HD. Thanks in advance, Kumar Mainali --
2018 Feb 23
0
change location of temporary files
Does setting the environment variable TMPDIR, before starting R, to a directory on a bigger file system help? On Linux I get % mkdir /tmp/RTMP-BILL % env TMPDIR=/tmp/RTMP-BILL R --quiet --vanilla > tempdir() [1] "/tmp/RTMP-BILL/Rtmppgowz4" > tempfile() [1] "/tmp/RTMP-BILL/Rtmppgowz4/file7ce36ec5cb1e" I don't know if there is an R-specific environment
2012 Dec 25
5
aggregate / collapse big data frame efficiently
Hi, I need to aggregate rows of a data.frame by computing the mean for rows with the same factor-level on one factor-variable; here is the sample code: x <- data.frame(rep(letters,2), rnorm(52), rnorm(52), rnorm(52)) aggregate(x, list(x[,1]), mean) Now my problem is, that the actual data-set is much bigger (120 rows and approximately 100.000 columns) ? and it takes very very long
2013 Feb 26
4
cut a vector in equal parts
Hi, I would like to cut a vector of values in parts. Each part should have an equal number of elements. for example: x <- (rnorm(500)^2) now I want 5 vectors each with 100 elements. The first vector should include the 100 lowest values of x and so on (so that the fifth vector contains the 100 highest values of x). thanks for any help!
2005 Nov 09
2
help with legacy R code
Hi there, Could somebody help me disect this legacy R script I inherited at work, I have two questions: 1. I've tried to upgrade our R version from 1.6.2 (yeah, I know), to R 2.0, but some of the lines in this script are not compatible with R 2.0, could someone help me figure out where the problem is? 2. the jpeg generated (attached) seems to be off on some of the data, is there a better way
2008 Jan 25
1
Does swfdec support rtmp?
Hi, Can you please tell me if swfdec support playing videos using rtmp? E.g. www.nytimes.com 's flash video player using rtmp. Does swfdec support it? Thank you.
2013 Jan 11
3
aggregate data.frame based on column class
Hi, When using the aggregate function to aggregate a data.frame by one or more grouping variables I often have the problem, that I want the mean for some numeric variables but the unique value for factor variables. So for example in this data-frame: data <- data.frame(x = rnorm(10,1,2), group = c(rep(1,5), rep(2,5)), gender =c(rep('m',5), rep('f',5))) aggregate(data,
2008 Jul 07
7
[Bug 16632] New: swfdec_net_connection_connect with non-NULL url real-world test case
http://bugs.freedesktop.org/show_bug.cgi?id=16632 Summary: swfdec_net_connection_connect with non-NULL url real- world test case Product: swfdec Version: 0.7.x Platform: Other URL: http://www.vampirefreaks.com/Official-Zombie-Girl OS/Version: All Status: NEW Severity: normal
2011 Sep 09
3
split variable / create categories
Hi, is there a function or an easy way to convert a variable with continuous values into a categorial variable (with x levels)? here is what I mean: I want to transform x: x <- c(3.2, 1.5, 6.8, 6.9, 8.5, 9.6, 1.1, 0.6) into a 'categorial'-variable with four levels so that I get: [1] 2 2 3 3 4 4 1 1 so each element is converted into its rank- value / categorial-value (in
2011 Aug 22
2
test if vector contains elements of another vector (disregarding the position)
Hi, I have the following problem: I have two vectors: i <- c('a','c','g','h','b','d','f','k','l','e','i') j <- c('a', 'b', 'c') now I would like to generate a vector with the length of i that has zeros where i[x] != any element of j and 1 where i[x] == any element of j.
2006 Nov 20
4
how to use the switch statement
Good morning, I am trying to recode the values of a column in a data frame and, instead of using a long series of if/else statements I would like to use a switch (as it is, for instance, in the C programming language). I have a column of this type: AT BB B1 B1 CC CC T6 B1 CC BB TT AT AT AT TT BB ... and I need to change this coding (if it's AT then it should be A1, if it's BB then
2008 Apr 21
1
Labelling a secondary axis in R
Hello, How can I label a secondary axis in R? At the moment it's labelled as c(-100,200). Obviously I would like it to be more sensible. Here is the code I am using newx = -100+37.5*((1:9)-1) axis(4,at=newx,labels=(newx+100)/3750) Thanks, Rob -- View this message in context: http://www.nabble.com/Labelling-a-secondary-axis-in-R-tp16807708p16807708.html Sent from the R help mailing list
1999 Jul 21
1
R 0.64.2 for Windows 95/NT
I installed R 0.64.2 using "rwinst.exe" on a Windows 95 machine. The zip files and rwinst.exe were stored in a directory "rtmp" and I wanted R to be installed in "r0642" (by setting c:\rtmp for source directory and c:\ for install directory). After the installation was completed the main program was in r0642 whereas all the documentation in c:\rtmp\r0642. Is this
2012 Jan 29
2
apply lm() to each row of a matrix
Hi, I would like to fit lm-models to a matrix with 'samples' of a dependent variable (each row represents one sample of the dependent variable). The independent variable is a vector that stays the same: y <- c(1:10) x <- matrix(rnorm(5*10,0,1), 5, 10) now I would like to avoid looping over the rows, since my original matrix is much larger; for(t in 1:dim(x)[1]) {
2009 Nov 18
2
error message; ylim + log="y"
Hi, I get a lot of error messages with this command, but I don't understand why; plot(c(),c(), xlim=c(1,10), ylim=c(0,10000), log="y") thanks for any help! [[alternative HTML version deleted]]
2003 Mar 17
2
Trying to build R-1.6.2 under sparc-sun-solaris2.9.
This is a follow-up to a message I posted yesterday concerning building R-1.6.2. After a deafening silence regarding that first message I decided to be fool-hardy and just comment out the line that seemed to be giving trouble in the file /usr/include/sys/stream.h. This worked for a while, but soon another error resulted: