search for: lev

Displaying 20 results from an estimated 383 matches for "lev".

Did you mean: dev
2012 Nov 18
2
[lattice] format and rotation of strip text
...08 ISBN 978-0-387-75968-5 e-ISBN 978-0-387-75969-2 http://dx.doi.org/10.1007/978-0-387-75969-2 I now know how to label lattice panels by variable value: see thread starting @ https://stat.ethz.ch/pipermail/r-help/2012-November/329450.html (and demonstrated below). This allows me to use lattice::levelplot() to display atmospheric data (gas concentrations) over a 3D space with dimensions longitude, latitude, and (vertical) level ... but I would like to fix a few things. Hopefully the following is a sufficiently "small, self-contained example" (though it has 2 side questions injected--...
2009 Sep 30
5
Condition to factor (easy to remember)
...notoriously difficult to explain in a course. Students love the ifelse construct given below most, but I remember some comment from Martin M?chler (?) that ifelse should be banned from courses. Any better idea? Not necessarily short, easy to remember is important. Dieter data = c(1,7,10,50,70) levs = c("Pre","Post") # Typical C-Programmer style factor(levs[as.integer(data >10)+1], levels=levs) # Easiest to understand factor(ifelse(data <=10, levs[1], levs[2]), levels=levs) -- View this message in context: http://www.nabble.com/Condition-to-factor-%28easy-to-reme...
2009 Jun 15
3
lack of memory for logistic regression in R?
Hi all, I am getting the following error message: > mymodel = glm(response ~ . , family=binomial, data=C); Error: cannot allocate vector of size 734.2 Mb In addition: Warning messages: 1: In array(0, c(n, n), list(levs, levs)) : Reached total allocation of 1535Mb: see help(memory.size) 2: In array(0, c(n, n), list(levs, levs)) : Reached total allocation of 1535Mb: see help(memory.size) 3: In array(0, c(n, n), list(levs, levs)) : Reached total allocation of 1535Mb: see help(memory.size) 4: In array(0, c(n,...
2011 Jan 20
4
LMTP & home, chroot, mail userdb fields.
...p". dovecot's LMTP can not deliver messages, because it seems that it uses userdb fields in some OTHER way. Errors look like this: Jan 20 12:19:25 lmtp(38939): Info: Connect from local Jan 20 12:19:25 auth: Info: mysql: Connected to /tmp/mysql.sock (mailhost) Jan 20 12:19:25 lmtp(38939, lev at domain.com): Error: mkdir(./cur) in directory /var/run/dovecot failed: Permission denied (euid=30000(v-mail) egid=30000(v-mail) missing +w perm: ., euid is not dir owner) Jan 20 12:19:25 lmtp(38939, lev at domain.com): Error: Opening INBOX failed: Mailbox doesn't exist: INBOX Jan 20 12:19:25...
2008 Jul 20
0
Off topic: SS formulae for 3-way repeated measure anova (for when aov() fails)
...Serr for the first interaction. Obviously I have missed something and although I have looked around for the explicit SSerr formulas for this design (my work thus far was extrapolated from understanding of a 2-way design), I can't seem to find any. Any help would be much obliged. N = 20 levs.a = 2 levs.b = 2 levs.d = 10 temp.sub = factor(1:N) temp.a = factor(1:levs.a) temp.b = factor(1:levs.b) temp.d = factor(1:levs.d) temp = expand.grid(sub=temp.sub, a=temp.a, b=temp.b, d=temp.d) temp$x = rnorm(length(temp[, 1])) #generate some random DV data sub=temp$sub a=temp$a b=temp$b d=temp$...
2008 Jan 02
3
Find missing days
Hi, I have a data.frame like this: y <- rnorm(60) lev <- gl(3,20, labels=paste("lev", 1:3, sep="")) date1 <- as.Date(seq(ISOdate(2007,9,1), ISOdate(2007,11,5), by=60*60*24)) date1 <- date1[-c(3,4,15,34,38,40)] df <- data.frame(lev=lev, date1=date1, y=y) I would like to produce a new data.frame with missing days in df$d...
2011 Nov 28
1
code problem with the optim() function
...rep(1:2,10),rep(2,5),rep(1,5)) ratings<-as.data.frame(cbind(x3,x4)) ratings <- as.matrix(na.omit(ratings)) ns <- nrow(ratings) nr <- ncol(ratings) r1 <- ratings[, 1] r2 <- ratings[, 2] if (!is.factor(r1)) r1 <- factor(r1) if (!is.factor(r2)) r2 <- factor(r2) ifelse (length(levels(r1)) >= length(levels(r2)),lev <- c(levels(r1), levels(r2)), lev <- c(levels(r2), levels(r1))) lev <- lev[!duplicated(lev)] r1 <- factor(ratings[, 1], levels = lev) r2 <- factor(ratings[, 2], levels = lev) ttab <- table(r1, r2) total<-margin.table(ttab) pa<-(margin.ta...
2002 Dec 01
1
generating contrast names
...ear R-devel list members, I'd like to suggest a more flexible procedure for generating contrast names. I apologise for a relatively long message -- I want my proposal to be clear. I've never liked the current approach. For example, the names generated by contr.treatment paste factor to level names with no separation between the two; contr.sum simply numbers contrasts (I recall an exchange on the list about this question); none of contr.* explicitly indicates what kind of contrasts are generated. There are ways around these problems -- e.g., beginning level names with an uppercase...
2020 Oct 20
2
How to assign the same levels to a dataframe column?
Hello, I have a dataframe df with a column x that has these unique values: "L" "M" "V" "N" "H". I can assign a factor to it: ``` df$x = as.factor(df$x) > [1] L M V N H Levels: H L M N V ``` I now need to get a subset of this dataframe. I could do the same thing as before on the subset sf, but I would like to avoid the possibility that not all the values could be present in sf. For instance, sf could have only the values "M" "V" "N". How...
2012 Nov 18
2
[newbie] convert 3D spatial array to dataframe
summary: how to convert a 3D array (as obtained from ncdf4::ncvar_get) to a dataframe suitable for use by lattice::levelplot(), e.g., levelplot(conc ~ lon * lat | lev, data = data.frame) details: I have atmospheric data in netCDF files specifying gas concentrations over a 3D space with dimensions longitude, latitude, and (vertical) level. I need to plot the data by level. Since there are several levels, I'm...
2008 Jul 23
1
R2WinBUGS problem
...r (i in 1:126) { dep[i] ~ dnorm(mu.dep[i],tau.dep) mu.dep[i] <- alpha[ID[i]]*NAK.cor[i]+beta[ID[i]]*TBW.cor[i] fit[i] <- mu.dep[i]+CONST[i] } tau.dep <- pow(sigma_dep,-2) sigma_dep ~ dunif(0,100) for (j in 1:16) { alpha[lev[j]] <- AB[lev[j],1] beta[lev[j]] <- AB[lev[j],2] AB[lev[j],1:2] ~ dmnorm(AB.hat[lev[j],],tau.AB[,])I(lower[], upper[]) AB.hat[lev[j],1] <- mu.alpha AB.hat[lev[j],2] <- mu.beta } lower[1] <- 0 lower[2...
2000 Apr 06
1
boxplot question
Hi, Can anyone tel me how to plot two boxplot at the same abscisse value ? Because I want to compare the discrimination of two different biological methods of the same data. Thanks Christine -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2006 Mar 11
2
Draw level lines on the surface of a bivariate function
Hello, Is it possible to draw level lines on the surface of a bivariate function? In the following example, to draw surface and levels lines for a multivariate normal law, I use persp, trans3d, contourLines and lines, but if the lines are correctly drawn, some parts of them are, of course, visible even if they are drawn on a n...
2009 Feb 11
2
Question about apply()
...447, 446.8, 448.5, 447.8, 449.2, 449, 449, 453.7, 454.4, 453.4, 453.8, 452.2, 450.7, 450.6, 451.4, 447.5, 18.34, 18.29, 17.65, 17.52, 16.96, 17.41, 18.51, 19.02, 19.43, 20.76, 20.76, 21.59, 22.28, 22.4, 22.63, 22.26, 22.71, 22.27, 21.75, 21.65), .Dim = c(20L, 4L), .Dimnames = list(NULL, c("TY1.lev", "SP1.lev", "GC1.lev", "CL1.lev")), index = structure(c(10959, 10960, 10961, 10962, 10963, 10966, 10967, 10968, 10969, 10970, 10973, 10974, 10975, 10976, 10977, 10980, 10981, 10982, 10983, 10984), class = "Date"), class = "zoo") What I want t...
2003 Jan 10
1
plot() and lines() multivariate problem
Dear list I'm trying to solve the following problem since 2 days with no success. Could someone help a newbie, please ? I have a dependant variable which is diameter of shell, and two factors which are level on the beach (3 levels 'B', 'E' and 'H') and a hydrodynamics indice (3 levels 1, 2 and 3) To study diameter variations according to these factors, I may use something like : > mod <- lm(diameter ~ level * hydro) When I want to look at the graphical results of such...
2002 Mar 17
2
using "by" and indicies
I sent this to the list last week, and haven't seen it pop up. Either I deleted it when it did appear, or possibly it was destroyed as spam...? If it did appear and I somehow missed it, appologies. In a nutshell, can the function FUN supplied to by() deduce what level of factor by() was on when FUN was called? I've been digging through the functions, and can't see where the distinction is made so that get() with a suitable "where=x" argument could help. Cheers Jason ----- Forwarded message from Jason Turner <jasont at indigoindustrial.c...
2020 Oct 20
0
How to assign the same levels to a dataframe column?
Stop using as.factor() and start using factor()? Be explicit about what levels you want and in what order. As for extracting subsets, use split() and do your subsets on each set of rows with the same level. It will be on you to decide what statistical properties (proportions?) you want to maintain between the full data set and your subset. On October 20, 2020 6:42:27 AM...
2007 Oct 15
1
avoiding a loop?
Hi All: I feel like there must be a slick R-native no-loop way to get the counts for the entries in a factor, but I'm unable to see how. Right now I'm doing this: hn.ent<-data.frame(rep(0,length(levels(hnf))), row.names=levels(hnf)) colnames(hn.ent)<-c("count") for (lev in levels(hnf)) { hn.ent[lev,"count"] <- sum(lev == hnf) } I'm sure there's a better way, but I don't know it. Can anyone help? Also, why does hn.ent[lev,"count"] work and hn...
2011 Nov 15
1
equal spacing of the polygons in levelplot key (lattice)
Given the example: R> (levs <- quantile(volcano,c(0,0.1,0.5,0.9,0.99,1))) 0% 10% 50% 90% 99% 100% 94 100 124 170 189 195 R> levelplot(volcano,at=levs) How can I make the key categorical with the size of the divisions equally spaced in the key? E.g., five equal size rectangles with labels at levs c(100...
2012 Nov 20
2
[lattice] how to overlay a geographical map on a levelplot?
r-help lattice adepts: I have a question which is somewhat geospatial, so I posted to r-sig-geo rather than here: https://stat.ethz.ch/pipermail/r-sig-geo/2012-November/016757.html > summary: How to overlay a geographical map on each panel in a lattice > (or Trellis), e.g., of levelplot's? Note I am not inquiring about > creating choropleth maps[,] which Sarkar 2008 covers quite well (and which is supported by latticeExtra::mapplot): I just want to appropriately overlay a garden-variety boundary-line map on panel viewspaces defined by longitude and latitude. A relat...