similar to: question regarding is.factor()

Displaying 20 results from an estimated 40000 matches similar to: "question regarding is.factor()"

2007 Aug 10
3
having problems with factor()
Dear R Help, I have a set of data of heights of trees described by area that they are in. The areas are numerical (0 to 7). ht area 1 320 3 2 410 4 3 230 2 4 360 3 5 126 1 6 280 2 7 260 2 8 280 2 9 280 2 10 260 2 ....... 180 450 4 181 90 1 182 120 1 183 440 4 184 210 2 185 330 3 186 210 2 187 100 1 188 0 0 I want to convert the
2011 Nov 24
2
how to add "waiting for page change" to my script
I'd like to "step" through 24 histograms by using the return or click button option, as shown in the demo(graphics) demonstration. I've searched for "interactive graphics", and "waiting for page change" in R documentation but with no result. I'm sure that this is a relatively straightforward procedure. Can anyone point me to the correct solution?   Jabez
2009 Nov 13
4
processing log file
Dear all, I'm trying to process a log file which logs the date, the username and the computer number accessed. The table looks like this: >table.users          Date UserName Machine 1  2008-11-25     John     641 2  2008-11-25    Clive     611 3  2008-11-25   Jeremy     641 4  2008-11-25     Walt     722 5  2008-11-25     Tony     645 6  2008-11-26     Tony     645 7  2008-11-26    
2011 Dec 01
1
Fw: calculate mean of multiple rows in a data frame
NAME ID a b c d 1 Control_1 probe~B01R01C01 381 213 345 653 2 Control_2 probe~B01R01C02 574 629 563 783 3 Control_1 probe~B01R09C01 673 511 521 967 4 Control_3 probe~B01R09C02 53 809 999 50 5 MM0289~RFU:11810.15 probe~B29R13C06 681 34 115 587 6 MM0289~RFU:9238.41 probe~B29R13C05 784 443 20 784 7 MM16597~RFU:36765.38 probe~B44R15C20 719 251 790 445 8 MM16597~RFU:41258.94 probe~B44R15C19 677
2009 Nov 25
1
Re-arrange Columns in data frame
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091125/789611db/attachment-0001.pl>
2005 Apr 05
1
accessing header information in a table
Dear list, I have read an excel table into R using read.table() and headers=T. The table is 7 columns of figures. Is there any way to gain access to the header information? Say the table headers are Mon, Tue etc I can get to the data with myTable$Tue, but how do I get the headers themselves. TIA Jab [[alternative HTML version deleted]]
2008 Mar 06
3
1-pnorm values in a table
Hi, I've read in a csv file (test.csv) which gives me the following table: Hin1 Hin2 Hin3 Hin4 Hin5 Hin6 HAI1 9534.83 4001.74 157.16 3736.93 484.60 59.25 HAI2 13272.48 1519.88 36.35 33.64 46.68 82.11 HAI3 12587.71 5686.94 656.62 572.29 351.60 136.91 HAI4 15240.81 10031.57 426.73 275.29 561.30 302.38 HAI5 15878.32 10517.14 18.93 22.00 16.91
2007 Aug 10
0
Odp: having problems with factor()
You've spotted it! table(df$area) 0 1 2 3 4 5 7 21 27 71 46 19 3 1 There are no values in area 6. Thank you very much. Jabez ----- Original Message ---- From: Petr PIKAL <petr.pikal@precheza.cz> To: Jabez Wilson <jabezwuk@yahoo.co.uk> Cc: R-Help <r-help@stat.math.ethz.ch> Sent: Friday, 10 August, 2007 1:02:21 PM Subject: Odp: [R] having problems with
2008 Jan 16
3
replace numbers in a column conditional on their value
Dear R help, I have a data frame column in which I would like to replace some of the numbers dependent on their value. data frame = zz AveExpr t P.Value FC 7.481964 7.323950 1.778503e-04 2.218760 7.585783 12.233056 6.679776e-06 2.155867 6.953215 6.996525 2.353705e-04 1.685733 7.647513 8.099859 9.512639e-05 1.674742 7.285446 7.558675 1.463732e-04 1.584071
2010 Sep 20
2
interpreting one-way anova tables
Hi, I am trying to reconcile anova table in R (summary(lm)) with individual t.test. datafilename="http://personality-project.org/R/datasets/R.appendix1.data" data.ex1=read.table(datafilename,header=T) #read the data into a table summary(lm(Alertness~Dosage,data=data.ex1)) gives: Call: lm(formula = Alertness ~ Dosage, data = data.ex1) Residuals:    Min     1Q Median     3Q    Max
2010 Sep 10
2
pairwise.t.test vs t.test
Dear all, I am perplexed when trying to get the same results using pairwise.t.test and t.test. I'm using examples in the ISwR library, >attach(red.cell.folate) I can get the same result for pairwise.t.test and t.test when I set the variances to be non-equal, but not when they are assumed to be equal. Can anyone explain the differences, or what I'm doing wrong? Here's an example
2007 Apr 19
1
Character coerced to factor and I cannot get it back
Something probably obivous but I don't see it. I needed to find the first 1 or two digits of some 5 and 6 digit numbers since they identified research sites while the rest of the number was the plot id. I converted the numbers to characters, got the first 1 or 2 characters as appropriate and went to add the new vector to the data.frame. For some reason R is insisting on turning the
2010 Oct 06
3
Empty data frame does not maintain column type
Does anyone know why a data frame created with empty character columns converts them to integer columns? > df<-data.frame(a=character(0),b=character(0)) > df<-rbind(df,c("a","a")) > typeof(df[1,1]) [1] "integer" AsIs doesn't help: > df<-data.frame(a=I(character(0)),b=I(character(0))) > df<-rbind(df,I(c("a","a")))
2007 Jul 05
1
getting values from arrays using which()
Dear R-Help, I have an array 1260x1260, upper triangle consisting of numbers between 0 and 100, and lower triangle all NA. I can extract the index of those values say above 99 using the following code: which(myArray>=99 , ind.arr=T) which returns: row col 5475 252 253 45423 764 765 46902 777 778 34146 611 962 50681 1220 1221 Now I would like to if poss print the actual value
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
2010 Apr 30
3
Why do data frame column types vary across apply, lapply?
Hi, I still have little ability to predict how these functions will treat the columns of data frames: > # Here's a data frame with a column "a" of integers, > # and a column "b" of characters: > df <- data.frame( + a = 1:2, + b = c("a","b") + ) > df a b 1 1 a 2 2 b > > # Except -- both columns are characters: >
2006 Nov 08
0
Fw: data frames re-ordering and naming columns
Thank you for help with the first part. The second part I do not understand. All I get is "3" "3". Presumably this is the factor that you refer to. Is there no simple way of extracting the text alone ----- Forwarded Message ---- From: Peter Alspach <PAlspach@hortresearch.co.nz> To: Jabez Wilson <jabezwuk@yahoo.co.uk> Sent: Tuesday, 7 November, 2006 7:46:02 PM
2010 Apr 07
1
Customizing ordination plots using symbols for factors
Hi, I could use a hand solving a fairly straightforward ordination plot problem: I am conducing NMDS on some community data for roughly 300 localities and 650 species. I have a community matrix, a species attribute matrix, and an environmental attributes matrix. After running metaMDS {vegan} on the community matrix, I can successfully use either of the other two matrices to draw hulls around
2004 Sep 08
4
factor always have type integer
typeof applied to a factor always seems to return "integer", independently of the type of the levels. This has a strange side effect. When a variable is "imported" into a data frame, its type changes. character variables automatically are converted to factors when imported into data frames. Here is an example: > v1<-1:3 >
2010 Oct 07
1
how to convert list to language object
If I have a list: list = c(~garch(1,1), ~arma(1,1)) and I run typeof(list[1]), the output is a list object. But I want each element in the list to be a language object. How do I transform these list objects to language objects? -- View this message in context: http://r.789695.n4.nabble.com/how-to-convert-list-to-language-object-tp2966813p2966813.html Sent from the R help mailing list archive at