[R] Re : Re : Sort out number on value

Pascal Oettli kridox at ymail.com
Fri Apr 20 14:42:10 CEST 2012


What is the result with 
> x[x>7.5]




----- Mail original -----
De : Yellow <s1010265 at student.hsleiden.nl>
À : r-help at r-project.org
Cc : 
Envoyé le : Vendredi 20 avril 2012 21h31
Objet : Re: [R] Re :  Sort out number on value

I found out something strange when I used the same thing on another data
file. 

In a excel file I have same data too and there I asked in a certain column
what values where above the 7.5. Result: 206. 
Now I have done the same thing in R and I get as result: 400. 

My code: 
# Find values above 7.5. 
C = x[x => 7.5]

# Calculate length. 
number = length[C]

# print outcome
number 

Or could it have something to do that I have calculated the log2 value from
a value dat was like: 7.84394 -01 However I don't think that was the problem
since I cheaked the first 10 log2 values, and they where correct. 

I just don't understand why the answer is now higer, 400 and not 206..... 

--
View this message in context: http://r.789695.n4.nabble.com/Sort-out-number-on-value-tp4573467p4573764.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list