search for: batb

Displaying 9 results from an estimated 9 matches for "batb".

Did you mean: bat
2006 Aug 08
2
Getting data out of a loop
...et 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) for (i in 1: length(nn)) { dd<- subset(Df, id==nn[i]) scat...
2006 Aug 28
2
Cannot get simple data.frame binding.
...ed 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(site, id, mat1) attach(data1) data1 aa <- which(names(data1)=...
2007 Feb 02
1
Assigning labels to a list created with apply
...s 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) {table(x)} jj <-apply(mat1, 1, fn1) ; jj ## Slow way to labe...
2007 Feb 07
6
setting a number of values to NA over a data.frame.
...nd 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(site, id, mat1) data1 # Obviously this works fine for one colu...
2006 Aug 07
0
Trying to do aseries of subsets with function or for loop
...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 <- function ( y, z) { df <-subset(Df, site == y) detach(Df)...
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
...el = 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 = c("aa", "bb", "cc", "dd"...
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
2016 Mar 01
3
[REGRESSION] nouveau: 30 second boot hang after commit 2b700825e
Hello, I am encountering a 30 second hang during boot, in the Xorg process just before the display manager comes up. I have bisected the problem to the following commit: commit 2b700825e7a7702fb862edba1262c98040dc1bf6 Author: Ben Skeggs <bskeggs at redhat.com> Date: Thu Aug 20 14:54:22 2015 +1000 drm/nouveau/mc: move device irq handling to platform-specific code The hang only