similar to: removing duplicated rows from a data.frame

Displaying 20 results from an estimated 2000 matches similar to: "removing duplicated rows from a data.frame"

2001 Oct 18
1
Fw: eval and as.symbol question
----- Original Message ----- From: "Kaspar Pflugshaupt" <pflugshaupt at geobot.umnw.ethz.ch> To: "Gary Collins" <gco at eortc.be> Cc: "r-help" <r-help at stat.math.ethz.ch> Sent: Thursday, October 18, 2001 2:19 PM Subject: Re: [R] eval and as.symbol question > On 18.10.2001 13:46 Uhr, Gary Collins wrote: > > > But when I merge these
2002 Jan 22
4
splitting a data.frame
I have the following (simple!?) problem which I am unable to find a relatively trivial solution to. If I have a dataframe, A 1 A 7 B 4 B 5 C 3 D 3 D 2 E 5 F 5 F 6 I would like to create a new data.frame in the form ID pt1 pt2 A 1 7 B 4 5 C 3 NA D 3 2 E 5 NA F 5 6 so that for each identifier, in this
2001 Apr 04
0
factors and characters when attaching data...
Can someone help me with the following problem... I have a dataframe with 62 columns a number of these are as.character and a number of these are as.double, I read these into R-1.2.0 as... > Version3.Studies_read.table("c:\\Version3.Studies.dat",sep="\t", as.is=TRUE, header=TRUE,strip.white=TRUE) This is fine up to here, I've checked to see if the data has been
2001 May 04
0
R and Xemacs
Can anyone help with the following...? I've just downloaded and installed Xemacs (version 21.1.9) for windows and I would like to try and use it for R, so I've also downloaded ESS 5.1.18. I've read the instructions on installation etc... with regards to ESS and followed the steps for using Xemacs on windows 95. i.e. I've included the path to the Rgui executable in my autoexec.bat
2008 Jan 10
5
Extracting last time value
I have a dataframe as follows: Date time value 20110620 11:18:00 7 20110620 11:39:00 9 20110621 11:41:00 8 20110621 11:40:00 6 20110622 14:05:00 8 20110622 14:06:00 6 For every date, I want to extract the row that has the greatest time. Therefore, ending up like: 20110620 11:39:00 9 20110621 11:41:00 8 20110622 14:07:00 6 I am using for loops (for every date, find largest time value) to do
2002 Oct 24
3
model.matrix (via predict) (PR#2206)
Full_Name: Glenn Stone Version: 1.5.1 and 1.6.0 OS: win2000 Submission from: (NULL) (168.140.227.9) The following code produces incorrect fitted values in version 1.5.1 and an error in 1.6.0 Error in "contrasts<-"(*tmp*, value = "contr.treatment") : contrasts apply only to factors In addition: Warning message: variable ihalf is not a factor in:
2008 Nov 07
15
any tricks re using " eql(5.5)", but where 5.5 is a decimal not float?
-- Sent from my mobile device
2009 Jul 12
1
Booting problem with memdisk + Thinkpad + USB
Hi, I encountered a booting problem with memdisk 2.83, USB and IBM Thinkpad T61, apparently the same issue as described here: http://syslinux.zytor.com/archives/2008-April/009850.html The boot process always stops after "Loading boot sector... booting...". With debug tracers enabled, the last few output lines are: Loading boot sector... FR<p>Dbooting...
2007 May 18
4
Simple programming question
Hi R-users, I have a simple question for R heavy users. If I have a data frame like this dfr <- data.frame(id=1:16, categ=rep(LETTERS[1:4], 4), var3=c(8,7,6,6,5,4,5,4,3,4,3,2,3,2,1,1)) dfr <- dfr[order(dfr$categ),] and I want to score values or points in variable named "var3" following this kind of logic: 1. the highest value of var3 within category (variable named
2001 Oct 15
0
date and chron library help...!
Dear all, I'm not sure whether this is a bug or not... But some help would be greatly appreciated. I have a dataframe, which I read in using read.xport (from the foriegn library) as the orginal data is in SAS format. 3 columns of this dataset are supposed to be dates, but read.xport doesn't recognise them as dates (all columns are read in as mode numeric). So I load up the date library
2010 Oct 04
2
i have aproblem --thank you
dear professor: thank you for your help,witn your help i develop the nomogram successfully. after that i want to do the internal validation to the model.i ues the bootpred to do it,and then i encounter problem again,just like that.(´íÎóÓÚerror to :complete.cases(x, y, wt) : ²»ÊÇËùÓеIJÎÊý¶¼Ò»Ñù³¤(the length of the augment was different)) i hope you tell me where is the mistake,and maybe i have
1997 Apr 08
1
R-alpha: User friendly functions
A loose idea for *post*-0.50 development I've been giving a some (but not all that many) thoughts to whether some of the conceptual difficulties facing newcomers could be avoided by having simplified functions for common operations. We already have parts of this, e.g. in Kurts ctest routines. Specifically, I was thinking about data frames: How about
2011 Jun 29
2
Indexing to Insert values from a dataframe into a matrix
Hello, I think this is a simple problem but I am not coming up with a simple solution. I think it just an indexing problem. I can easily replace values in a matrix from a dataframe when the dataframe has row and column numbers. In the example below I use row and column names and I can not get it to work #make a matrix where rows and columns are the lat and long for a bounding box of Australia
2007 May 20
2
Number of NA's in every second column
Hi R-users, How do I calculate a number of NA's in a row of every second column in my data frame? As a starting point: dfr <- data.frame(sapply(x, function(x) sample(0:x, 6, replace = TRUE))) dfr[dfr==0] <- NA So, I would like to count the number of NA in row one, two, three etc. of columns X1, X3, X5 etc. Thanks in advance Lauri [[alternative HTML version deleted]]
2004 Jul 16
3
sas to r
I would be incredibly grateful to anyone who'll help me translate some SAS code into R code. Say for example that I have a dataset named "dat1" that includes five variables: wshed, site, species, bda, and sla. I can calculate with the following SAS code the mean, CV, se, and number of observations of "bda" and "sla" for each combination of
2010 Oct 04
1
I have aproblem about nomogram--thank you for your help
dear professor: I have a problem about the nomogram.I have got the result through analysing the dataset "exp2.sav" through multinominal logistic regression by SPSS 17.0. and I want to deveop the nomogram through R-Projject,just like this : > n<-100 > set.seed(10) > T.Grade<-factor(0:3,labels=c("G0", "G1", "G2","G3")) >
2008 Mar 06
2
How to hold a value(Mean sq) with a string
Hi all: Can someone advice me on how to hold the residuals Mean sq value on a string so it can be used in other calculations. I was trying something like this: Msquare<-dfr$Mean sq but fails..Thanks dfr <- read.table(textConnection("percentQ Efficiency 1.565 0.0125 1.94 0.0213 0.876 0.003736 1.027 0.006 1.536 0.0148 1.536 0.0162 2.607 0.02 1.456 0.0157 2.16 0.0103
2006 Apr 20
1
Randomly selecting one row for each factor level [Broadca st]
The following should work: > dfr.samp <- dfr[tapply(1:nrow(dfr), dfr$x, sample, 1),] > dfr.samp x y z 10 a 10 J 2 b 2 B 9 c 9 I Andy From: Kelly Hildner > > I don't use R much, and I have been unable to figure out how > to get the > subset of my data frame that I would like. > > For example, if this were my data frame: > > > dfr <-
2005 Apr 06
3
looking for a plot function
Dear useRs, I have a data frame and I want to plot all rows. Each row is represented as a line that links the values in each column. The plot looks like this: dfr <- data.frame(A=sample(1:50,10),B=sample(1:50,10), C=sample(1:50,10),D=sample(1:50,10)) xa <- 10*1:4 plot(c(10,40),c(0,50)) for (i in 1:nrow(dfr)) { lines(xa,dfr[i,],pch=20,type="o") } Things get more complicated
2011 Mar 28
2
GSoC 2011 Weighting Schemes
Hi, guys I am Wenjin from Graduate School of Chinese Academy of Science, pursing a master degree and my current research interests including using Data mining and Information retrieve technology to analysis software engineering (SE) data and support SE. I have great interested in "Weight Schemes" project. and in the last few days I have learnt some detail about DFR model family by