similar to: syntax for batching rbind process

Displaying 20 results from an estimated 9000 matches similar to: "syntax for batching rbind process"

2010 Aug 12
4
conditional selection of dataframe rows
Dear helpeRs, I have a dataframe (14947 x 27) containing measurements collected every 5 seconds at several different sampling locations. If one measurement at a given location is less than zero on a given day, I would like to delete all measurements from that location on that day. Here is a toy example: toy <- data.frame(CH = rep(3:5,3), DAY = c(rep(4,5), rep(5,4)), SLOPE =
2006 Dec 20
1
Reformat meteorological data
Dear HelpeRs: I have a data set in the following format, which will be familiar to those of you working with NCDC climate data. Example: Year <- rep(1:3, each = 3) Year <- c(Year,Year) ID <- rep(1:2, each = 9) Jan <- runif(18, min = 0, max = 20) Feb <- runif(18, min = 0, max = 20) Mar <- runif(18, min = 0, max = 20) var <- gl(3,1,18,label =
2010 Sep 28
2
Reshape
Hello, helpeRs, I've been trying, unsuccessfully, to change a dataframe from long to wide format using reshape (the original). I would appreciate it if someone could demonstrate the correct syntax. The script below will create a toy example. The new wide data should have a column name for each unique entry in the "fame" column. Under each column should be either the
2012 Jun 20
2
reshape
Hello, helpeRs, I am attempting to reshape (either base R or package reshape) multiple .csv spreadsheets from a very unfortunate wide format to long format. ?Each spreadsheet looks something like this, after being read in to R: toy <- data.frame(year = rep(2007:2008,each = 20), month = rep(1:5,each = 4, length = 40), day = rep(1:2,each = 2,length = 40), hhmm = rep(1100:1101,length = 40),
2010 Aug 27
3
interpreting date-related error message
Hello, helpeRs, I have a vector of numbers from 1-365 (days of the year) that I would like to convert to a date. There are no NA's and no missing values. I did not insert leading zero's for numbers less than 100. Using the syntax: dat$doy.1 <- as.numeric(format(dat$doy, "%j" )) I get the following error message: Error in prettyNum(.Internal(format(x, trim, digits,
2010 Nov 08
7
How to rbind list of vectors with unequal vector lengths?
Hi, How to rbind these vectors from a list?: > l <- list(a = c(1, 2), b = c(1, 2, 3)) > l $a [1] 1 2 $b [1] 1 2 3 > do.call(rbind, l) [,1] [,2] [,3] a 1 2 1 b 1 2 3 Warning message: In function (..., deparse.level = 1) : number of columns of result is not a multiple of vector length (arg 1) > -J
2008 Jun 24
1
Error message: Bad value
Dear R help, In the middle of my session, I started receiving the error message "bad value" regardless of what I entered. I had to close R and restart it. When the error occurred, I was creating basic lattice plots, with no other add-on packages running. I am running R through John Fox's XEmacs interface, XEmacs version 21.4.20 on a Windows XP Pro machine with 2 GB of RAM. I have
2012 Nov 01
2
Name assignment in for loop
Dear helpeRs- I'm using a for loop to create a series of models. I'm trying to assign a name to each model created, using the loop index. The loop gets stuck at the name of the model, giving the error "target of assignment expands to non-language object". The linear model runs without error; only the name is problematic. Here is the current loop syntax. The use of dat
2010 Jan 05
2
Dynamic arguments in "rbind" function
Hi, all Basically, I have unknown number of data that need to be imported and collapsed row-wisely. The code below works fine, however the "rbind" function may require 50 arguments if there are 50 data files... Thus, I would like to explore whether there are any methods in using dynamic objects (i.e from the resulting objects in the for loop) as an argument in the *"rbind"*
2005 Aug 26
2
dom0 bootup -- Device eth0 has differet mac address than expected
CentOS 4.1, Xen 2.0.7. My dom0 is booting up but can''t get to the outside network because eth0 won''t start due to, apparently, Xen providing a different mac address than expected. How do I tell Xen to start eth0 at the bootup with a specific mac address that lines up with the HWADDR= line in my ifcfg-eth0? Note that a normal bootup into CentOS 4.1 outside of the Grub Xen bootup
2013 May 17
3
Command line not responding
Running 9.0-Stable on an i386. Whenever I type a command at the prompt I get the output /usr/local/lib/libintl.so.9: Undefined symbol "_ThreadRuneLocale" and nothing else - the command will not run. Just the above output. Commands like "ls" and "exit" work, but not much else. This happends whether I am logged in a user or as root. Cannot even halt the system from
2010 Mar 04
1
extracting values conditonal on other values
Dear R helpers, I have a dataframe (test1) containing the time of sunrise and sunset for each day of the year for 3 years. I have another dataframe (test2) containing measurements that are taken every 15 minutes, 24/7. I would like to extract all rows from test2 that occur between sunrise and sunset for the appropriate date. Can you suggest a good vectorized way to do this? Keep in mind
1998 Jun 26
2
R-beta: Problem with functions using sub and gsub
Previously I had problems with data(foo) and Gass and I had problems with help(). His diagnostic was "POSIX regular expressions not available" and mine was "invalid regular expression". Martin Maechler has no problems with Solaris 2.5 and suggested a regular expression library was needed, e.g., regex-x.xx. Solaris 2.4 has regex.o in /usr/ccs/libgen.a and regex.h in
2005 Aug 23
5
Bug#324615: new rules for imp4
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Package: logcheck-database Version: 1.2.41 Severity: wishlist Tags: patch Hi, here is one line for the imp4 package and one (I don't have more) line from the log file. Same as with the horde3 file: I've tested it and CC this mail to the maintainer. by, Martin - -- Powered by Debian GNU / Linux -----BEGIN PGP SIGNATURE----- Version: GnuPG
2013 Jun 26
6
[LLVMdev] Proposal: extended MDString syntax
On Wed, Jun 26, 2013 at 3:59 PM, Nadav Rotem <nrotem at apple.com> wrote: > > On Jun 26, 2013, at 3:51 PM, Chandler Carruth <chandlerc at google.com> wrote: > > Can you suggest an alternative solution? Can you describe why you don't > think metadata is the right container? This alone isn't really helpful at > moving us toward something that there has been
2008 May 16
2
Integer / floating point question
Dear R-help - I have thought about this question for a bit, and come up with no satisfactory answer. Say I have the numeric vector t1, given as t1 <- c(1.0, 1.5, 2.0, 2.5, 3.0) I simply want to reliably extract the unique integers from t1, i.e., the vector c(1, 2, 3). This is of course superficially simple to carry out. However, my question is related to R FAQ 7.31, "Why
2009 Aug 31
4
Offtopic, HT vs. HH in coin flips
Dear R-help, Could someone please try to explain this paradox to me? What is more likely to show up first in a string of coin tosses, "Heads then Tails", or "Heads then Heads"? ##generate 2500 strings of random coin flips ht <- replicate(2500, paste(sample(c("H", "T"), 100, replace = TRUE), collapse =
2006 Apr 17
1
Equivalence test and factors
Hello, helpeRs, I recently used a linear mixed effects model followed by ANOVA to assess the relationship between a categorical predictor variable with 2 levels (and random effects) and a numeric response variable. As I was concerned about the lack of a power analysis prior to data collection, it was suggested that I use an equivalence test to complement the conventional hypothesis test.
2008 Jul 02
1
Hmisc latex function with longtable option
Hello - I'm trying to use Hmisc's latex function to produce a postscript file of a data.frame, using the longtable = TRUE option. When I run, for example, ## sample R code dvips(latex(data.frame(a = rnorm(100), b = rnorm(100)), longtable = TRUE), file = "test.ps") latex runs successfully and a test.ps file is produced. However, I see the following in the
2010 May 23
4
creating a reverse geometric sequence
Hello, Can anyone think of a non-iterative way to generate a decreasing geometric sequence in R? For example, for a hypothetical function dg, I would like: > dg(20) [1] 20 10 5 2 1 where I am using integer division by 2 to get each subsequent value in the sequence. There is of course: dg <- function(x) { res <- integer() while(x >= 1) { res <- c(res, x) x