search for: ratb

Displaying 8 results from an estimated 8 matches for "ratb".

Did you mean: catb
2006 Aug 08
2
Getting data out of a loop
...in such a way that I can use it. I can print it but how do I get it into a set of vectors or what ever. Any help gratefully received. Thanks Example cata <- c( 3,5,6,8,0, NA) catb <- c( 1,2,3,4,5,6) doga <- c(3,5,3,6,4, 0) dogb <- c(2,4,6,8,10, 12) rata <- c (NA, 5, 5, 4, 9, 0) ratb <- c( 1,2,3,4,5,6) bata <- c( 12, 42,NA, 45, 32, 54) batb <- c( 13, 15, 17,19,21,23) id <- Cs(a,b,b,c,a,b) site <- c(1,1,4,4,1,4) mat1 <- cbind(cata, catb, doga, dogb, rata, ratb, bata, batb) Df <- data.frame(site, id, mat1) nn <- levels(Df$id) Df nn rate <- c(2,3,4) f...
2006 Aug 28
2
Cannot get simple data.frame binding.
...beled data.frame. The orginal data comes from a spss file imported using spss.get but the current data.frame is a subset of the orginal spss file. EXAMPLE cata <- c( 1,1,6,1,1,NA) catb <- c( 1,2,3,4,5,6) doga <- c(3,5,3,6,4, 0) dogb <- c(2,4,6,8,10, 12) rata <- c (NA, 9, 9, 8, 9, 8) ratb <- c( 1,2,3,4,5,6) bata <- c( 12, 42,NA, 45, 32, 54) batb <- c( 13, 15, 17,19,21,23) id <- c('a', 'b', 'b', 'c', 'a', 'b') site <- c(1,1,4,4,1,4) mat1 <- cbind(cata, catb, doga, dogb, rata, ratb, bata, batb) data1 <- data.frame(...
2007 Feb 02
1
Assigning labels to a list created with apply
...the tables in the results in the list. I know that I can do this individually but there should be a way to do something like an apply but I am missing it cata <- c( 1,1,6,1,1,NA) catb <- c( 1,2,3,4,5,6) doga <- c(3,5,3,6,4, 0) dogb <- c(2,4,6,8,10, 12) rata <- c (NA, 9, 9, 8, 9, 8) ratb <- c( 1,2,3,4,5,6) bata <- c( 12, 42,NA, 45, 32, 54) batb <- c( 13, 15, 17,19,21,23) id <- c('a', 'b', 'b', 'c', 'a', 'b') site <- c(1,1,4,4,1,4) mat1 <- cbind(cata, catb, doga, dogb, rata, ratb, bata, batb) fn1 <- function(x) {...
2007 Feb 07
6
setting a number of values to NA over a data.frame.
...NA thus I have df1[,144:157] <- NA if df1[, 144: 157] ==0 and df1[, 190:198] <- NA if df1[, 190:198] ==0 but I cannot figure out a way do this. cata <- c( 1,1,6,1,1,NA) catb <- c( 1,2,3,4,5,6) doga <- c(3,5,3,6,4, 0) dogb <- c(2,4,6,8,10, 12) rata <- c (NA, 9, 9, 8, 9, 8) ratb <- c( 1,2,3,4,5,6) bata <- c( 12, 42,NA, 45, 32, 54) batb <- c( 13, 15, 17,19,21,23) id <- c('a', 'b', 'b', 'c', 'a', 'b') site <- c(1,1,4,4,1,4) mat1 <- cbind(cata, catb, doga, dogb, rata, ratb, bata, batb) data1 <- data.frame(...
2006 Aug 07
0
Trying to do aseries of subsets with function or for loop
...ng about exporting multiple .csv files a couple of days ago that would be relevant but I cannot find it. Can anyone suggest anything? Thanks Example: cata <- c( 3,5,6,8,0, NA) catb <- c( 1,2,3,4,5,6) doga <- c(3,5,3,6,4, 0) dogb <- c(2,4,6,8,10, 12) rata <- c (NA, 5, 5, 4, 9, 0) ratb <- c( 1,2,3,4,5,6) bata <- c( 12, 42,NA, 45, 32, 54) batb <- c( 13, 15, 17,19,21,23) id <- Cs(a,b,b,c,a,b) site <- c(1,1,4,4,1,4) Df <- data.frame(cbind(site, id, cata, catb, doga, dogb, rata, ratb, bata, batb)) Df attach(Df) rate <- c(2,3,4,5,6,7,8,9) st <- Df$site prog &...
2009 Sep 19
1
Re-order columns
Dear R'sians, Would really appreciate if you could suggest a more efficient way to order the columns of a dataset. The column names of the dataset contain indices separated by a period. Following are examples of my code and the dataset. oC <- function(tg=x2) { lth <- length(grep("T",names(tg))) thix <-
2011 Jan 13
0
Help with Data Transformation - RESOLVED
...1, 1, 4, 4, 1, 4), id = structure(c(1L, 2L, 2L, 3L, 1L, 2L), .Label = c("a", "b", "c"), class = "factor"), cata = c(1, 1, 6, 1, 1, NA), catb = c(1, 2, 3, 4, 5, 6), doga = c(3, 5, 3, 6, 4, 0), dogb = c(2, 4, 6, 8, 10, 12), rata = c(NA, 9, 9, 8, 9, 8), ratb = c(1, 2, 3, 4, 5, 6), bata = c(12, 42, NA, 45, 32, 54), batb = c(13, 15, 17, 19, 21, 23)), .Names = c("site", "id", "cata", "catb", "doga", "dogb", "rata", "ratb", "bata", "batb"), row.names =...
2012 Mar 08
6
how to modify the tickment of x-axis
hi I plot a series of observation data every minutes in a day as the attachment below plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY) In the figure, the x-axis tickment is the number of data How can I change it fore example 1h 2h 3h 4h and so on ? -- TANG Jie Email: totangjie at gmail.com Tel: 0086-2154896104 Shanghai Typhoon Institute,China