Displaying 8 results from an estimated 8 matches similar to: "SAS PROC SORT nodupkey"
2011 Feb 28
3
Problems using unique function and !duplicated
Hi, I am trying to simultaneously remove duplicate variables from two or more
variables in a small R data.frame. I am trying to reproduce the SAS
statements from a Proc Sort with Nodupkey for those familiar with SAS.
Here's my example data :
test <- read.csv("test.csv", sep=",", as.is=TRUE)
> test
date var1 var2 num1 num2
1 28/01/11 a 1 213 71
2
2009 Apr 28
8
duplicate 'row.names' are not allowed
Hi everyone,
I have got the following problem:
x1 <- rnorm(10,5,1)
x2 <- runif(10,0,1)
nam1 <- paste("A",1:4,sep=".")
nam2 <- paste("A",6:9,sep=".")
nam <- c(nam1,"A.4",nam2,"A.9")
mydata <- data.frame(x1,x2)
rownames(mydata) <- nam
Error in `row.names<-.data.frame`(`*tmp*`, value = c("A.1",
2006 Jan 10
1
Find last row (observation) for each combination of variables
Let's say I have a data.frame like
A B C TS other columns
1 1 1 12345
1 1 1 56789
1 2 1 23456
1 2 2 23457
2 4 7 23458
2 4 7 34567
2 4 7 45678
and I want the last row for each unique combination of A/B/C, where by "last" I mean greatest TS.
A B C TS other columns
1 1 1 56789
1 2 1 23456
1 2 2 23457
2 4 7 45678
I did this simply in SAS:
proc sort data=DF;
by A B C descending TS
2012 Aug 29
2
Deduping in R by multiple variables
I have a dataset w/ 184K obs & 16 variables. In SAS I proc sort nodupkey it
in seconds by 11 variables.
I tried to do the same thing in R using both the unique & then the
!duplicated functions but it just hangs there & I get no output. Does
anyone know how to solve this?
This is how I tried to do it in R:
detail3 <-
2011 Mar 06
20
does wine opens and works Babylon 8 well ??!!
does wine opens and works Babylon 8 well ??!!
if i installed wine,will Babylon work well on it ?!!
hope you will answer me
thanks
2000 Oct 10
1
Adding a new column to data frame (recoding)
Dear R users,
I have a very simple question. What is the easiest way to recode data in
one
of the columns of a data frame and put it into a new column?
For example, here is a simple data frame:
var1
1 1
2 2
3 3
How do I add a new column to data - 'var2' in which I group values in
'var1',
for example:
var1 var2
1 1 4
2 2 4
3 3 5
It's got to
2007 Aug 23
7
Histogram
Hello,
I wanted to create a histogram, but somehow I got stuck...
The interval limits are: x = 1, 2, 3, 3.5, 4.5, 5, 5.5
The interval widths are therefore: 1, 1, 0.5, 1, 0.5, 0.5
Nothing I tried worked... Can anyone help me please?
Thanks
Tobias
--
View this message in context: http://www.nabble.com/Histogram-tf4315900.html#a12288850
Sent from the R help mailing list archive at Nabble.com.
2007 Aug 28
1
FW: How to fit an linear model withou intercept
Hi Mark,
I don't know wether you recived a sufficient reply or not, so here are
my comments to your problem.
Supressing the constant term in a regression model will probably lead to
a violation of the classical assumptions for this model.
From the OLS normal equations (in matrix notation)
(1) (X'X)b=X'y
and the definition of the OLS residuals
(2) e = y-Xb
you get - by