similar to: Deduping in R by multiple variables

Displaying 20 results from an estimated 130 matches similar to: "Deduping in R by multiple variables"

2012 Aug 31
2
Conditional merging in R & if then statement
1)I am wandering how the following SQL statement can be written in R language w/o using sqldf: create table detail2 as select a.* from detail a, pdetail b where a.TDATE=b.TDATE and (a.STIM >= b.STIM and a.STIM <=b.MAXTIM) 2) when try if then in R it only applies to the 1st row & not to whole dataset like in SAS. How do you get round that? in SAS: data summary; set all1;
2005 Dec 24
2
Ajax Help: Multiple Updates - ?
Hi! Wondering if anyone can tell me what''s wrong with my code? I''m trying to use the onChange event of a select list to update multiple divs... Agile Web Development with Rails (p. 403) suggests using ":complete => eval(request.responseText) instead of :update" I''ve attempted the following test code: # in the view <select name="plist",
2012 Aug 24
1
if then in R versus SAS
I am new to R and I have the following SAS statements: if otype='M' and ocond='1' and entry='a.Prop' then MOC=1; else MOC=0; How would I translate that into R code? Thanks in advance -- View this message in context: http://r.789695.n4.nabble.com/if-then-in-R-versus-SAS-tp4641225.html Sent from the R help mailing list archive at Nabble.com.
2009 May 06
2
rmysql query help
R HELP, I am trying to use an R script to connect to a mysql database. I am having a problem using a variable in the where clause that contains a "space" in its value. If I include the variable inside the quotes of the query - i think it is searching for the name of the variable in the database and not the value of the variable. If I put it outside the quotes, then it complains
2008 Nov 25
1
run time function for R scripts?
Hi All, I was wondering if there was a function in R that would output the total run time for various scripts. For now I have the following workaround: begTime <- Sys.time() ... the rest of the R script... runTime <- Sys.time()-begTime Is there another function that I don't know about that would return this information in a more elegant manner? Thanks! [[alternative HTML
2010 Mar 24
2
translating SQL statements into data.table operations
I've recently stumbled across data.table, Matthew Dowle's package. I'm impressed by the speed of the package in handling operations with large data.frames, but am a bit overwhelmed with the syntax. I'd like to express the SQL statement below using data.table operations rather than sqldf (which was incredibly slow for a small subset of my financial data) or import/export with a
2006 Feb 22
5
Rsync help needed...
Hello, I was reading your posts about RSYNC. We have a massive Oracle schema lots of datafiles about 750 GB size. We do rsync datafiles from source to target server but everytime we cleanup the datafiles on the target server and do rsync every 2 weeks. On the target side mostly the datafiles will be same but on source we might have added few datafiles or made some changes in data and as such the
2006 Jan 15
2
rsync of file list
Hi All, I would to rsync data spread of many files from remote site. Each file may exist in total different location - the path for each file may be different. My question is: Can I do it one single rsync command, giving a file containing list of paths as parameter, or do I need to run rsync for each file. I did not find any option doing it in the man page. I tried to play with
2008 Dec 09
1
[LLVMdev] [PATH] Add sub.ovf/mul.ovf intrinsics
Hi, The attached patch implements sub.ovf/mul.ovf intrinsics similarly to the recently added add.ovf intrinsics. These are useful for implementing some vm instructions like sub.ovf/mul.ovf in .NET IL efficiently. sub.ovf is supported in target independent lowering and on x86, while mul.ovf is only supported in the x86 backend. Please review
2004 Jun 27
2
subset drop unused levels
hi there tried to use subset with drop=TRUE, but all the 'old' levels are preserved, i.e. when calling e.g. ftable a lot of zeros are displayed >x<-subset(LREG, (kir=='AA' | kir=='BB') & (type=='t1' | otype=='t2'), drop=TRUE, select=c(event, kir, type)) > ftable(x) i explicit have to call factor like
2001 Feb 12
5
SCO OS3 build broken (CVS 01/12/01)
It looks like something got broken in openbsd-compat/bsd-snprintf.c ... gcc -g -O2 -Wall -Dftruncate=chsize -I/usr/local/include -I/usr/local/ssl/includ e -I. -I.. -I../src/openbsd-compat -I../src/openbsd-compat/.. -DHAVE_CONFIG_H -c ../src/openbsd-compat/bsd-snprintf.c In file included from ../src/openbsd-compat/bsd-snprintf.c:72:
2006 Mar 21
3
Rsync 4TB datafiles...?
I need to rsync 4 TB datafiles to remote server and clone to a new oracle database..I have about 40 drives that contains this 4 TB data. I would like to do rsync from a directory level by using --files-from=FILE option. But the problem is what will happen if the network connection fails the whole rsync will fail right. rsync -a srchost:/ / --files-from=dbf-list and dbf-list would contain this:
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
2012 Oct 10
3
How to replicate SAS by group processing in R
Hello, I am trying to re-code all my programs from SAS into R. In SAS I use the following code: proc sort data=upper; by tdate stock_symbol expire strike; run; data upper1; set upper; by tdate stock_symbol expire strike; if first.expire then output; rename strike=astrike; run; on the following data set: tdate stock_symbol expiration strike 9/11/2012 C 9/16/2012
2010 Sep 17
7
removing specific rows from array
I'm attempting to create an array of treatment comparisons for modelling data generation. This involves comparison of one treatment (c2) with another (c3), relative to a common comparator (c1). Attached code gives me the correct array but need to remove duplicates. Duplicates relate only to c2 and c3 such that I need to remove r3 because c2 and c3 are same as r1 with c2 and c3 swapped r5
2018 Apr 15
4
Adding a new conditional column to a list of dataframes
Hi all .., I have a list of 7000 dataframes with similar column headers and I wanted to add a new column to each dataframe based on a certain condition which is the same for all dataframes. When I extract one dataframe and apply my code it works very well as follows :- First suppose this is my first dataframe in the list > OneDF <- Mylist[[1]] > OneDF ID Pdate
2018 Mar 29
1
Problem with my function using as.POSIXct
Hello all: I wrote a function: my.bastimeToSynoptic <- function(x) { f<-unlist(strsplit(as.character(x), " ")) hr<-unlist(strsplit(f[2], ":")) if(as.numeric(hr[1])<6) { synoptic<-"00" } else { synoptic<-as.integer(as.numeric(hr[1])/6)*6 } tdate<-paste(c(f[1],"
2015 Nov 06
2
(sin asunto)
Hola a tod en s, sigo intentando representar una variable en función de meses. En la columna Mesos tengo los meses de la siguiente manera: 01/08/1996, 01/09/1996 etc. He probado con el siguiente comando: plot(Mesos, Serie01) obteniendo y tendría que obtener: [image: Imágenes integradas 2] Pero donde pone Observation Index, me gustaria tener los meses (para esta grafica he usado
2018 Apr 15
0
Adding a new conditional column to a list of dataframes
> On Apr 15, 2018, at 4:08 AM, Allaisone 1 <Allaisone1 at hotmail.com> wrote: > > > Hi all .., > > > I have a list of 7000 dataframes with similar column headers and I wanted to add a new column to each dataframe based on a certain condition which is the same for all dataframes. > > > When I extract one dataframe and apply my code it works very well as
2006 Sep 11
1
Aliasing type method in Mocha
Hi, (Mocha and Stubba are great, btw.) Is there any way to alias the call to .type in Mocha? The issue is that AR effectively aliases the normal type method for the Column class (for whatever Adapter.) My code is reflecting on the adapter methods to iterate over the columns in a particular model. This makes it hard to write test code that stubs out columns and mocks my models. E.g. cols =