similar to: Histogram in Lattice with 3 factors

Displaying 20 results from an estimated 200 matches similar to: "Histogram in Lattice with 3 factors"

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:
2009 Sep 30
5
Condition to factor (easy to remember)
Dear List, creating factors in a given non-default orders is 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 =
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
2012 May 29
1
lattice: add a marginal histogram on top of the colorkey of a levelplot?
Lattice experts: Can you think of a way to produce a levelplot as below and then add a histogram of the z variable to the top margin of the plot that would sit on top of the color key? x <- seq(pi/4, 5 * pi, length.out = 100) y <- seq(pi/4, 5 * pi, length.out = 100) r <- as.vector(sqrt(outer(x^2, y^2, "+"))) grid <- expand.grid(x=x, y=y) grid$z <- cos(r^2) *
2007 Apr 15
1
unable to find inherited method for function "edges", for signature "ugsh", "missing"
I am new to using S4 methods and have run into this problem (on Windows XP using R 2.4.1): I am writing a package in which I use the graph package. I define my own classes of graphs as: setOldClass("graphsh") setOldClass("ugsh") setIs("ugsh", "graphsh") (I know that I "should have" used setClass instead - and I will eventually - but right now
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,124,170,189,195)? Apologies if this is obvious. -A R> version
1999 May 05
1
Ordered factors , was: surrogate poisson models
For ordered factor the natural contrast coding would be to parametrize by the succsessive differences between levels, which does not assume equal spacing of factor levels as does the polynomial contrasts (implicitly at least). This requires the contr.cum, which could be: contr.cum <- function (n, contrasts = TRUE) { if (is.numeric(n) && length(n) == 1) levs <- 1:n
2018 Mar 24
1
Function 'factor' issues
I am trying once again. By just changing f <- match(xlevs[f], nlevs) to f <- match(xlevs, nlevs)[f] , function 'factor' in R devel could be made more consistent and back-compatible. Why not picking it? -------------------------------------------- On Sat, 25/11/17, Suharto Anggono Suharto Anggono <suharto_anggono at yahoo.com> wrote: Subject: Re: [Rd] Function
2017 Oct 15
2
Function 'factor' issues
In R devel, function 'factor' has been changed, allowing and merging duplicated 'labels'. Issue 1: Handling of specified 'labels' without duplicates is slower than before. Example: x <- rep(1:26, 40000) system.time(factor(x, levels=1:26, labels=letters)) Function 'factor' is already rather slow because of conversion to character. Please don't add slowdown.
2007 Jul 25
1
how to use "replace" for efficiency
Hi I think I have been struggling to use replace correctly, I usually work my way around this using a loop, but I think this is in fact inefficient. I have a dataset with runoff from three plots and associated rainfall. However either the datarecording was sloppy, or the rainfall very patchy. So I am trying to remove data from my dataset for which the runoff is larger than the rainfall on the
2007 Mar 20
1
Error in nlme with factors in R 2.4.1
Hi, the following R lines work fine in R 2.4.0, but not in R 2.4.1 or any devel versions of R 2.5.0 (see below for details). library(drc) # to load the dataset 'PestSci' library(nlme) ## Setting starting values sv <- c(0.43355869, 2.49963220, 0.05861799, 1.73290589, 0.38153146, 0.24316978) ## No error m1 <- nlme(SLOPE ~ c + (d-c)/(1+exp(b*(log(DOSE)-log(e)))), fixed =
2004 Oct 04
2
AW: constructing specially ordered factor
Hi Dimitris, thank you for your reply, > does the following work in your data: > > levs <- unique.default(Names) > factor(Names, levs[order(unique.default(Weights))]) your solution is really shorter, but has two issues to be meant here: 1. "unique.default" is applied twice, what might be a bit expensive for strings. 2. your solution brings an implicit
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users, I will be glad if someone can point out what I am doing wrong or not doing at all in this. I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written. For example: >library(ncdf) >path <- '/home/work/' >forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep="")) > fore <-
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users, I will be glad if someone can point out what I am doing wrong or not doing at all in this. I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written. For example: >library(ncdf) >path <- '/home/work/' >forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep="")) > fore <-
2008 May 01
1
Locale problem with umlauts in factor levels in 2.7.0 (patched) from grid or lattice
With 2.7.0 patched (not tested with 2.0.0), I get an error message in a program that ran correctly in R 2.6.2 when the grouping factor of a stripplot contains an Umlaut: I am aware that there are a few locale-changes in R 2.7.0, but I could not easily locate who's at fault Dieter library(lattice) dt = data.frame(x=rnorm(100),y=1:100,levs= as.factor(c("Gru","Gr?")))
2002 Dec 01
1
generating contrast names
Dear 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
2007 Aug 30
7
Behaviour of very large numbers
Dear all, I am struggling to understand this. What happens when you raise a negative value to a power and the result is a very large number? B [1] 47.73092 > -51^B [1] -3.190824e+81 # seems fine # now this: > x <- seq(-51,-49,length=100) > x^B [1] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN <snip> > is.numeric(x^B) [1] TRUE > is.real(x^B) [1]
2007 Apr 29
1
[debug] package - Error in all.levs (PR#9638)
Dear All, I encountered the following problem: fun1 <- function(x){ 2*cos(x) } >library(debug) > mtrace(fun1) > fun1(0.1) Error in all.levs[[j]] : subscript out of bounds > sessionInfo() R version 2.5.0 (2007-04-23) i386-pc-mingw32 locale: LC_COLLATE=Polish_Poland.1250;LC_CTYPE=Polish_Poland.1250; LC_MONETARY=Polish_Poland.1250;LC_NUMERIC=C;LC_TIME=Polish_Poland.1250 attached
2012 Jul 13
0
How to simulate the relationship of vegetation and groundwater in Minqin Oasis, Gansu Province, China
*Dear **Madam**/**Sir,* *What would happen if we irrigate the degraded land using the desalinated saline water in Minqin Oasis, Gansu Province, China? Can we prevent the disappearing of Minqin Qasis?* * * *Background:* *1. **The Minqin Oasis is surrounded by two deserts, Badain Jaran Desert and Tengger Desert. * *2. **Water is the root of ecological
2015 Jun 08
0
New R package kwb.hantush (0.2.1): calculation of groundwater mounding beneath an (stormwater) infiltration basin
Dear R users, It is a pleasure for me to announce the availability of the new package kwb.hantush (0.2.1)? on CRAN. Its objective is the calculation of groundwater mounding beneath an (stormwater) infiltration basin by solving the Hantush (1967) equation. For checking the correct implementation of the algorithm the R modelling results were cross-checked against alternative models assessed in