search for: levs

Displaying 20 results from an estimated 385 matches for "levs".

Did you mean: less
2012 Nov 18
2
[lattice] format and rotation of strip text
Thanks to the lattice gurus on this list, and having reference to the excellent open-access Sarkar 2008 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
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-remem...
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, n...
2011 Jan 20
4
LMTP & home, chroot, mail userdb fields.
Hello, Dovecot. I'm using postfix + dovecot with pure virtual users. postfix uses standard virtual transport, and dovecot fetches such fields from userdb: chroot: "/usr/home/hosted/v-mail/%d/%n" home: "/" mail: "maildir:." Everything works Ok -- dovecot founds users' mail. Now, after upgrade to dovecot2, I want to use it LMTP server as
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$d...
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$date1 in each df$lev, like this: lev
2011 Nov 28
1
code problem with the optim() function
Please forgive me if someone has seen this duplicated email, because I sent the email to the wrong address just now. Hi, all, I'm estimating an inter-rater coefficient, Aickin (1990)'s alpha. It's been a long time for me to figure out how to make it work, but it's still of no avail. The problem seems to be my code with the optim() function. Can anyone help me take a look at the
2002 Dec 01
1
generating contrast names
...with illustrations of their use: ------------------------------------------------------------------------------------------------------------------------------ contr.Treatment <- function (n, base = 1, contrasts = TRUE) { if (is.numeric(n) && length(n) == 1) levs <- 1:n else { levs <- n n <- length(n) } lev.opt <- getOption("decorate.factor.levels") pre <- if (is.null(lev.opt)) "" else lev.opt[1] suf <- if (is.null(lev.opt)) "" else lev.opt...
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
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
2008 Jul 23
1
R2WinBUGS problem
Dear friends - I'm on winXP, R 2.71 - I have with some help dveloped this multivariate normal model, which gives very plausible results in WinBUGS even without any initial values specified. However, when I then try to run the same model via the bugs function in R2WinBUGS with inits specified as inits=NULL the program stops in a dead end. So I have tried to make inits for the bugs function
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 non visible "face". Any suggestion to avoid this problem
2009 Feb 11
2
Question about apply()
Hello, everyone! Assume you have this data: data <- structure(c(66.609375, 67.09375, 66.40625, 66.734375, 67.109375, 66.875, 66.09375, 65.921875, 66.546875, 66.140625, 66.140625, 65.65625, 65.875, 65.59375, 65.515625, 66.09375, 66.015625, 66.140625, 66.109375, 66.421875, 1702.7, 1647.7, 1649.4, 1639.9, 1696.4, 1710.9, 1690.2, 1677.9, 1694.4, 1713.9, 1713.9, 1705.4, 1708.4, 1692.9, 1689.6,
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
2002 Mar 17
2
using "by" and indicies
...s Jason ----- Forwarded message from Jason Turner <jasont at indigoindustrial.co.nz> ----- ... I'm using by() to call pairs(), and would like to put the factor level into the title. A toy example would be something like: > d1 <- data.frame(rnorm(100),rt(100,2),sin(1:100)) > levs <- as.factor(rep(1:5,20)) > levels(levs) <- c("low","med-lo","med","med-hi","high") > by(d1,levs,pairs) Is there an elegant way to get "low"..."high" in the main title for each plot, without binding "levs"...
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 PDT, Luigi Marongiu
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
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