search for: numeric_003f

Displaying 17 results from an estimated 17 matches for "numeric_003f".

2011 Mar 21
5
Stucked with as.numeric function
...but they are classified as factors as str() shows. Therefore my goal is to convert the colum from factor to numeric level with keeping the decimals. I have googled the problem for a while now and kept to several advices like http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f and history from the list but it is impossible for me to convert the data to numeric without rounding or ranking the values. E.g.: Simply using as.numeric puts the values into ranked classes as explained in the manual, As.numeric(as.character(probas)) as well as as.numeric(levels(probas$forecast...
2009 Apr 17
1
real numeric variable transforms into factor:
Hi Test made in: R in windows Vista OS, R version 2.8.1 From FAQ: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f "It may happen that when reading numeric data into R (usually, when reading in a file), they come in as factors. If |f| is such a factor object, you can use as.numeric(as.character(f)) to get the numbers back." 1: Why it may happen? Why R transforms x1 from real numeric with decimal v...
2010 Sep 07
3
Help with decimal points
Hi I have found a little problem with an R script. I am trying to merge some data and am finding something unusual going on. As shown below I am trying to assign (MatchedValues[Value2,Value]) to (ClusteredData[k,Value]) which are two separate dataframes. 1) By the following command you can see that the value im transferring is 481844.03 > MatchedValues[Value2,Value] [1] 481844.03 6618
2009 Mar 02
2
ave and grouping
Dear list, # I have a DF like this: sleep$b <- c(rep(8,10), rep(9,10)) sleep$me <- with(sleep, ave(extra, group, FUN = mean)) sleep # I would like to create a new variable # holding the b-th value of group 1 and 2. # This is not what I want, it takes always the '8' from group '1' # and not the '9' sleep$gr <- with(sleep, ave(extra, group, FUN = function(x)
2010 Jan 13
3
convert factor data to numeric
hello could you give me a hint to convert data in factor type to numeric (float) ? regards -- Open WebMail Project (http://openwebmail.org) -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
2009 Apr 13
3
Factor to continuous
Hi I am really struggling with changing my factors into continuous variables. There is plenty of information on changing continuous to a factor which is the opposite of what i need to do. I would be soooooo grateful for any help Thanks Joe -- View this message in context: http://www.nabble.com/Factor-to-continuous-tp23020769p23020769.html Sent from the R help mailing list archive at
2009 Apr 30
1
factor issue
Hi, I have a column which I have to convert from factors to numeric. I am using the command as.numeric(variable) to do this. But when I convert the numeric value becomes different from factor . for example. > class(B) [1] "factor" > B [1] 180 <NA> 183 175 163 155 <NA> 188 191 160 170 165 152 170 165 [16] 163 160 163 165 <NA> > as.numeric(B)
2010 Apr 19
5
dataframe
Hi all, I'm trying to load a csv file in which all the variables must be of type number.The object is a dataframe.When i load the file what i get is a dataframe in wich the variables are of type factor.How can I get variables of type number??? Thanks all
2009 Feb 27
2
factors to integers preserving value in a dataframe
I want to produce a dataframe with integer columns for elements of string pairs: pairs <- c("10 21","23 45") pairs.split <- lapply(pairs,function(x)strsplit(x," ")) pdf <- as.data.frame(pairs.split) names(pdf) <- c("p","q") -- at this point things look good, except the columns are factors, as I didn't change the default
2004 Nov 10
1
Basic Q on coercing factors in data frames to numeric
Hi there, I'm running R 2.0.0 on Windows 95. I'm trying to coerce a column of factors within a data frame to numeric. This is not a problem with a vector, but I can't find a way to index a column within a data frame to achieve this. All the examples from 'An introduction to R', 'S-plus 6 programmers guide', etc, use simple vectors. I'm sure I'm missing
2009 Jun 01
2
subset dataframe/list
Hi R-helpers! I have the following object: > head(coeficientes) caedois b1 b2 b3 1 1 0,033120395 -20,29478338 -0,274638864 2 2 -0,040629634 74,54239889 -0,069958424 3 5 -0,001116816 35,2398622 0,214327185 4 10 0,171875 5 14 0,007288399 40,06560548 -0,081828338 6 15 0,027530346 0,969969409 0,102775555
2007 Apr 19
4
hello
ok how can I do to cancel le function factor for the moment ican't do this and I'm stuck with my problem for exemple Id_Rep Id_Geno Val_O Id_TrT1 1 1 64238 145 2 2 1 64238 1 1 3 1 64238 2 1 4 1 64238 1 1 5 1 64238 1 1 6 1 64238 2 1 7 1 64238 1 1 8 2
2009 May 01
3
factor level
Hi All, I have problem about the factor features. I read in a .cvs file, a column which is supposed to be numeric, but it becomes factor level data after reading in. mydata[,"newXaxis"] [1] 0 0.430010601 11.23198508 25.00940297 37.75338045 45.98289639 [7] 48.92328133 52.51142822 61.12359751 63.85832121 70.98927949 77.16550181 [13] 97.73545713 113.6588007 118.6588007
2009 May 15
2
help with as.numeric
hi everyone, wondering if you could help me with a novice problem. I have a data frame called subjects with a height and weight variable and want to calculate a bmi variable from the two. i have tried: attach(subjects) bmi <- (weight)/((height/100)^2) but it comes up with the error: Warning messages: 1: In Ops.factor(height, 100) : / not meaningful for factors 2: In Ops.factor((weight),
2008 Jun 12
7
How to change the class of data?
Hi all, I have some data x, which are actualy consisted of numerical enties. But the class of this matrix is set to be "factor" by someone else. I used "class(x)", it turns out to be "factor". So I can not calculate them. How can I turn them into numerical data so that I can apply math operations on them? Thanks a lot for your help. Selina [[alternative HTML
2005 May 06
4
Change class factor to numeric
I am attempting to develop a multiple regression model using selected model variables that should all be treated as numeric (mostly real) values. However, R considers one specific variable "mass" automatically to be of class "factor", probably because "mass" consists of integer values that are repeated. I now want to force R to treat "mass" as a numeric
2004 Nov 11
0
ROracle SQL length limitation
...bert Brown FM CEFAS <r.g.brown at cefas.co.uk> Cc: r-help at stat.math.ethz.ch Message-ID: <4192159B.4050602 at jhsph.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed I believe this is a FAQ. See http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f -roger Robert Brown FM CEFAS wrote: > Hi there, > > I'm running R 2.0.0 on Windows 95. I'm trying to coerce a column of factors within a data frame to numeric. This is not a problem with a vector, but I can't find a way to index a column within a data frame to achieve this...