similar to: use subset to trim data but include last per category

Displaying 20 results from an estimated 600 matches similar to: "use subset to trim data but include last per category"

2012 Aug 27
2
simplest way (set of functions) to parse a file
Hello, What would be the best set of R functions to parse and transform a file? My file looks as shown below. I would like to plot this data and I need to parse it into a single data frame that sorts of "transposes the data" with the following structure: > df <- data.frame(n=c(1,1,2,2),iter=c(1,2,1,2),step=as.factor(c('Step 1', 'Step2', 'Step 1',
2011 Aug 31
1
formatting a 6 million row data set; creating a censoring variable
List, Consider the following data. gender mygroup id 1 F A 1 2 F B 2 3 F B 2 4 F B 2 5 F C 2 6 F C 2 7 F C 2 8 F D 2 9 F D 2 10 F D 2 11 F D 2 12 F D 2 13 F D 2 14 M A 3 15 M A 3 16 M A 3 17
2010 Dec 24
4
Removing rows with earlier dates
Hi all, I'm new to the list but have benfited from it quite extensively. Straight to my rather strange question: I have a data frame that contains mapping rules in this way: ACCOUNT, RULE COLUMNS, Effective Date The dataframe comes from a database that stores all dates. What I would like to do is to create a data frame with only the most recent rule for each account. In traditional
2010 Jan 27
3
Function for describing segements in sequential data
Dear R-users, Say that I have a sequence of zeroes and ones: x <- c(1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0) The sequences of ones represent segments and I want to report the starting and endpoints of these segments. For example, in 'x', the first segment starts at location 1 and ends at 3, and the second segment starts at location 8 and ends at location 10. Is there an efficient
2004 Jun 20
4
if syntax
I ran into an interesting oddity of R, if (0) { print(1); } else { print(2); } is a syntax error, while if (0) { print(1); } else { print(2); } or if (0) { print(1); } else { print(2); } is not. I presume it has to do with the duality of the newline functioning as an end of command (;) character, though it still seems a bit odd, and it took me a while to figure out
2005 Nov 11
1
Snow parLapply
Dear R-user, I am trying to use the function 'parLapply' from the 'snow' package which is supposed to work the same wys as 'lapply' but for a parallelized cluster of computers. The function I am trying to call in parallel is 'dudi.pca' (from the 'ade4' package) which performs principal component analyses. When I call this function on a list of
2012 Oct 19
4
Creating a new by variable in a dataframe
Hello, I have a dataframe w/ 3 variables of interest: transaction,date(tdate) & time(event_tim). How could I create a 4th variable (last_trans) that would flag the last transaction of the day for each day? In SAS I use: proc sort data=all6; by tdate event_tim; run; /*Create last transaction flag per day*/ data all6; set all6; by tdate event_tim; last_trans=last.tdate; Thanks
2006 Jun 09
2
edit- view duality
Skipped content of type multipart/alternative-------------- next part -------------- *********************************************************************** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. Bear Stearns does not provide tax,
2010 May 27
4
[LLVMdev] Using LLVM to compile Objective-C on an Xbox 360
We are looking at using Objective-C/C++ in a new game engine.  Objective C's duality of being both very dynamic and very "C" gives us exactly what we need to make the SDK and engineering of games simpler. This means that we will need a way to compile it on all platforms our games will target.  Currently the major platforms we are concerned with include... PC, Mac, XBox 360, PS3,
2009 Jan 24
1
Help with dudi.pca
Dear R-helpers, I have two data frames, op and em4: > str(op) 'data.frame': 37 obs. of 5 variables: $ m : num 0.202 0.336 0.122 0.139 0.14 ... $ lln : num 0.798 0.643 0.863 0.835 0.823 ... $ rrn : num 0.789 0.702 0.894 0.895 0.923 ... $ asym2: num 0.177 0.304 0.108 0.187 0.274 ... $ asym3: num 0.0755 0.0975 0.0818 0.0651 0.13 ... > str(rownames(op)) chr
2014 Dec 10
3
Checking if host is on the same subnet
We are doing a deployment across many sites, we're doing one site at a time and we're bringing a "mobile server" (a laptop, really) to keep traffic local instead saturating the WAN link of each site. I'd like to make a script so each client can determine if the mobile server is on the same subnet either with a ping with a zero TTL value, with the ip/netmask and a bit of
2018 Dec 05
2
DebugInfo: Global variable expression management
Hi Folks, Looking into some other issues, I came across a couple of oddities with regard to debug info for global variables (PR39900 <https://bugs.llvm.org/show_bug.cgi?id=39900> and PR39899 <https://bugs.llvm.org/show_bug.cgi?id=39899>). But a broader question I was wondering if it was anyone's radar (it's not something I'll be pushing on myself in the near future, but
2008 Jun 24
2
logistic regression
Hi everyone, I'm sorry if this turns out to be more a statistical question than one specifically about R - but would greatly appreciate your advice anyway. I've been using a logistic regression model to look at the relationship between a binary outcome (say, the odds of picking n white balls from a bag containing m balls in total) and a variety of other binary parameters:
2017 Jan 12
2
IR canonicalization: shufflevector or vector trunc?
On Thu, Jan 12, 2017 at 11:06 AM, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 1/12/2017 9:04 AM, Sanjay Patel via llvm-dev wrote: > > It's time for another round of "What is the canonical IR?" > > Credit for this episode to Zvi and PR31551. :) > https://llvm.org/bugs/show_bug.cgi?id=31551 > > define <4 x i16> @shuffle(<16 x i16>
2014 Dec 17
0
Checking if host is on the same subnet
Alexandre Blanchette <blanalex at gmail.com> writes: > On Wed, Dec 10, 2014 at 10:14 AM, Ferenc Wagner <wferi at niif.hu> wrote: > >> Alexandre Blanchette <blanalex at gmail.com> writes: >> >>> We are doing a deployment across many sites, we're doing one site at >>> a time and we're bringing a "mobile server" (a laptop,
2010 May 27
2
[LLVMdev] Using LLVM to compile Objective-C on an Xbox 360
This is certainly an option... but keeping up an LLVM backend for the 360 seems like a bit much work. Using Clang's rewriter requires no real low-level maintenance, just creating and maintaining a C library for support functions emitted by the compiler (e.g. objc_msgSend). It seems to create a backend for LLVM targeting the 360 I wouldn't need to create something that outputs XEX's
2010 May 27
5
[LLVMdev] Using LLVM to compile Objective-C on an Xbox 360
Implementing the backend (or editing the current PPC backend as needed) is a definite option. This seems to be the real question... which is easier... maintaining the PPC backend or maintaining the rewriter. Currently (in admittedly trivial tests) I have gotten the rewriter to work and output C code. There are some outstanding issues to do with linking and accessing the reflection information
2017 Jan 13
2
IR canonicalization: shufflevector or vector trunc?
Right - I think that case looks like this for little endian: define <2 x i32> @zextshuffle(<2 x i16> %x) { %zext_shuffle = shufflevector <2 x i16> %x, <2 x i16> zeroinitializer, <4 x i32> <i32 0, i32 2, i32 1, i32 2> %bc = bitcast <4 x i16> %zext_shuffle to <2 x i32> ret <2 x i32> %bc } define <2 x i32> @zextvec(<2 x i16>
2003 May 08
1
AW: approximation of CDF
> Almost any method of fitting a density estimate would work on > integrating (numerically) the result. it is a nice idea concerning the monotony property, which will be obtained automatically, but I am going to use results of approximation analytically > In particular, look at package polspline, where > p(old)logspline does the integration for you. thank you, I am going to
2009 Dec 18
1
Doubts about ADE-4
Hi, I'm having some troubles in using the ADE-4 package. I want to analyze data for the Outlying Mean Index in the function 'niche'. I've got two matrixes: one for environmental data and the other for species abundance data. But to implement the analysis, as I understand it, I need to put tocheger these two matrixes in one, as in the example provided with the package. Un