similar to: invert order

Displaying 20 results from an estimated 2000 matches similar to: "invert order"

2008 Jul 20
1
garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not
Dear list, While trying to identify the root of a problem I am having with garbage collected variables, I have come across the following oddity: depending on whether --verbose is set or not, I obtain different results. I have made a small standalone example to demonstrate it. The example is very artificial, but I had a hard time reproducing reliably the problem. So when I do: (the content of
2009 Jun 26
1
bug in Rf_PrintValue ?
I'm very green with R, so maybe this is not a bug, but it looks like one to me. The following program segfaults at the second call to Rf_PrintValue(). To failure depends on the value of the y-string. E.g., if I change it from "coverage" to, say, "COVERAGE", the segfault does not occur. /* bug.c */ #include <stdio.h> #include <Rinternals.h> #include
2012 Jan 19
2
POSIXct value display incorrect for some values
First, the reproducable example, showing how converting from character to POSIXct to character changes the milliseconds in the first time stamp though not in the second: > as.POSIXct('2010-06-03 9:03:58.324') [1] "2010-06-03 09:03:58.323 PDT" > as.POSIXct('2010-06-03 9:03:58.325') [1] "2010-06-03 09:03:58.325 PDT" This seems to be due to truncation of
2008 Aug 28
1
Interaction between aggregate() and length()
Folks, I've been running into an odd situation that occurs when I use length() function with aggregate(), but not with either one separately. Together, the results looks correct but is given an unexpected name. 'if (stringsAsFactors) factor(x) else x' instead of just 'x'. # Numbers work ok tt <- data.frame(idx=c(1,1,1,1,1,1,2,2,2,2,2,2)
2013 Aug 27
1
Error in simulation. NAN
Hi all, im triyng to implement a bayesian model with R and c++. I have a strange problem. I can't reproduce the error with a small script and then i post the original one. The problem is after the line for(MCMC_iter2=0;MCMC_iter2<thin;MCMC_iter2++) For the first 34 iterations all work fine, after, all the simulations of mu_acc_P return an "nan". If i delete the line
2009 Apr 02
1
Updating a data frame
Folks, Updating values in a table is simple in SAS or SQL, but I've wracked my brain looking for an elegant solution in R to no avail thus far. Certainly this is a common need that's been solved in dozens of different ways. Given an initial dataframe nn and a smaller dataframe of updates uu, I'd like to replace the values in nn <- expand.grid('a'=1:4, 'b'=1:3)
2009 Feb 10
1
aggregate taking way too long to count.
Folks, I'm checking the structure of a dataframe for duplicate parameters at a site station (i.e depth should be measured once, not twice), using aggregate to count each parameter within a site station. The fake data below has only 26000 rows, and takes roughly 14 seconds. My real data has 750000 rows and I had to stop execution after about an hour. The by() function is faster, but I
2010 Dec 09
1
how to use diff() with different variables?
Hi, I first should say I am new to R. I have searched without success the R-archives to see if I could find an answer to what I am about to ask you. My dataset is like: x fine 1 A 2010-12-09 07:57:33 2 B 2010-12-09 08:05:00 3 C 2010-12-08 20:42:00 ... that is: 'data.frame': 3 obs. of 2 variables: $ x : Factor w/ 3 levels "A","B","C":
2011 Jul 13
3
Colors in R
HI everyone, I''m trying to assign colors to multiple lines in a graph. Problem is I don''t want to type in as many colors as there are lines....is there a way around this? In brief, I''m plotting the logratio for up to 60 samples and want a different color for each sample. Here is the code I''m using now.. Any help is greatly appreciated.. Best LT data <-
2008 Dec 11
3
Logical "in" test
OK, this should be trivial but I'm not finding it. I want to compress the test, if (i==7 | i==10 | i==30 | i==50) {} into something like if (i in c(7,10,30,50)) {} so I can build a "excludes" vector excludes <- c(7,10,30,50) and test if (i in excludes) {} However, I'm not finding a clue on how to accomplish this, if it can be done. Would someone with more R
2009 Feb 04
3
R command to compare two vectors?
By any chance is there an R command to compare two vectors?   For example, a_tmp<-c("a", "b", "c", "d", "e", "f", "g", 'h') b_tmp<-c("a", "c", "e", "g")   I would like to compare b_tmp against a_tmp to determine if the members of b_tmp are part of a_tmp.    I tried
2011 Apr 11
4
nndist R vs. ArcGIS
Can anyone tell me why I would get different average nearest neighbor values for the same set of coordinates between ArcGIS 10 and R? Sometimes the difference in distance is over 1.3 km. Alexis -- View this message in context: http://r.789695.n4.nabble.com/nndist-R-vs-ArcGIS-tp3442375p3442375.html Sent from the R help mailing list archive at Nabble.com.
2010 Dec 10
3
Delete observations with a frequency < x
Hi, I have two columns with data (both identifiers - it's an affiliation list) and I would like to delete the rows in which the observations in the second column have a frequency < 5 in the entire second column. Example: 1 a 1 b 1 c 2 a 2 b 2 d Let's say, I would like to delete the rows in which the observation in the second column has a frequency < 2 in
2009 Apr 22
2
R-User groups in North America (SF, LA, NYC, Ottawa)
Hi R folks, I'd like to announce several new R users groups here in SF, LA, NYC, and Ottawa - as well as their next scheduled event. The goal of these user groups, besides gently explaining 'drop=TRUE' to the uninitiated, is to exchange knowledge, promote best practices, and spur the adoption of R for innovative applications. If I've missed any groups here, please feel to add on
2011 Feb 25
6
preventing repeat in "paste"
Hello! s<-"start"; e<-"end" middle<-as.character(c(1,2,3)) I would like to get the following result: "start 123 end" or "start 1 2 3 end" or "start 1,2,3 end" How can I avoide this (undesired) result: paste(s,middle,e,sep=" ") Thank you! -- Dimitri Liakhovitski Ninah Consulting www.ninah.com
2011 Apr 19
3
How to program with colleagues
Dear all, my colleagues and I have to write some R code for some of our projects. I would like to ask you help to organize us a little. a. Do you know if there is any system that can convert our R scripts to html pages with some nice dependency graphs (which functions calls which). b. Could you please suggest me an easy way to exchange the R code with my colleagues. I know about these version
2010 Nov 05
4
subsets, %in%
Hi, I have a question about %in% and subsettin data frames. Say I need to keep ID 1,2,4,5, 10 from the data frame dat. I can do: dat <- data.frame(ID = 1:10, var = 1:10) someID <- c(1,2,4,5,10) subset(dat, dat$ID %in% someID) Is there a quick way to do the opposite, ie to do a subset that contains all ID but someID? Something like %not in%, which would *remove* lines with ID in
2012 Jan 27
2
PosixCT subsecond accuracy
A sample of the data I have is: > head(sensor) logged_on accx accy accz compassx compassy compassz gyrox gyroy gyroz 1 1326561428000 -0.4602 0.8346 0.0936 0.145508 -0.350586 0.259766 59.617390 28.521740 59.617390 2 1326561428050 -0.4212 1.0452 0.1326 0.219727 -0.321289 0.241211 88.695656 27.478260 88.695656 3 1326561428100 -0.2496 1.3416 0.2886 0.214844 -0.326172
2010 Aug 02
7
Linux Editor
Hi Everyone, I recently have started using R again on a Linux box after spending several years on a Mac. Last I checked, the best way to use R was through EMACS using something like ESS. I remember that being serviceable but not always the most convenient. Is there anything comparable to the mac version of R with its built in console, editor, etc?? thanks! -- View this message in context:
2010 Jan 25
5
Data transformation
Dear all, I have a dataset that looks like this: x <- read.table(textConnection("col1 col2 3 1 2 2 4 7 8 6 5 10"), header=TRUE) I want to rewrite it as below: var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 1 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0