similar to: visualize lme results

Displaying 20 results from an estimated 1000 matches similar to: "visualize lme results"

2004 May 29
3
panel function in a conditioned lattice graphic
I'm trying to use plotting character to encode the variable "block" from my dataset in a conditioned lattice graphic (R 1.9.0 on Mac OS 10.3.3). The data I'm using is the dataframe "dryoutcover" which is here (4k): http://anthony.darrouzet-nardi.net/downloads/dryoutcover.Rdata The code that generates my graphic almost correctly is as follows: xyplot(coversage ~
2012 Sep 17
3
eval(parse(...)) only once in a function
Hi I would like to have something like str <- "df$JT == 12" fun <- function(df) { b <- eval(parse(str)) return(b) } but for performance "eval(parse(a))" should not be evaluated at each function call, but should work as fun <- function(df) { b <- df$JT == 12 return(b) } Do you have an idea how I can implement this? Thx Christof
2010 Jan 21
2
Help with subset
I am so happy about learning how to read in multiple Excel files, that I have to try and make another improvement. I know what I have been doing is clumsy, but it works. Hopefully, someone can suggest a more elegant solution. As a novice, I have been using MS-Word and mail merge to write my code. I start with about 2 pages of code, and end up with 2,220 merged pages that I copy and paste into R.
2012 Oct 26
2
connect points in charts
Hi is there a automatic way that long distances between points are not connected. I have something like plot(x,y,type="o",...) atx <- seq(as.Date("2009-04-01"),as.Date("2011-04-01"),"month") axis.Date(1, at=atx,labels=format(atx, "%b\n%Y"), padj=0.5 ) but I do not want lines between points whose distance is greater than two weeks. thx
2012 Jul 02
2
save conditions in a list
Hi how would you save conditions like a = "day > 100"; b = "val < 50"; c = "year == 2012" in a list? I like to have variables like "day", "val", "year" and a list of conditions list(a,b,c). Then I want to check if a & b & c is true or if a | b | c is true or similar things. Greetings Christof
2012 Sep 25
1
nlme function examples for dose-respone
Hi, I want to fit nonlinear dose-response curves, as "fun(X,a,b,c)", for each of our 5 trail locations. Our data basis is something like location plot year dose response For each location there are 4 plots as repetitions (over 3 years). So the interactions "location*year" and "location*plot" should be random effects. There are some examples in "Mixed-Effects
2012 Aug 14
3
self-starter functions for y = a + b * c^x
Hi there are some predefined self-start functions, like SSmicmen, SSbiexp, SSasymp, SSasympOff, SSasympOrig, SSgompertz, SSflp, SSlogis, SSweibull, Quadratic, Qubic, SSexp (nlrwr) Btw, do you know graphic examples for this functions? The SSexpDecay (exponential decay) for y = (y0 - plateau)*exp(-k*x) + plateau from
2004 Jun 02
1
Using postscript() in a script that is source()ed
I have a script that draws 9 graphics which I would like to run by source()ing the file. In the script I make objects that contain each of the graphics (all lattice objects or functions that contain lattice functions). Then at the end of the script, I have a section which prints them to separate eps files like this: postscript(file = "dryoutcover.eps", height = 5, width = 7,
2004 May 10
1
RODBC in RAqua
I've been trying to get RODBC working in RAqua. For my database, let's call it "mydb", when I enter odbcConnect("mydb") or odbcConnect("mydb", uid="postgres", pwd="secret"), RAqua thinks for about 10 seconds, then crashes. mydb is a PostgreSQL 7.4.2 database running on my machine (Mac OS X 10.3.3). I am using the pgsqlodbc 7.2.5 driver
2007 Oct 26
0
Queue() problems
I've been trying to setup AddQueueMember() as a replacement for the deprecated AgentCallbackLogin(), but I get _tree_ Queue()'s. Massaged extensions.conf (can provide the original if need be): ----- s n i p ----- [default] include => agent-loginout include => local ; ---------- [agent-loginout] exten => _100.,n,Macro(queue-addremove,I${EXTEN:3},dispatch,10)
2011 Dec 09
1
apply on function with vector as result
Hi, a have some code like myfunc <- function(x) { ...; return c(a,b) } ys <- sapply(0:100,myfunc) so I get something like c(c(a1,b1),c(a2,b2),...) But now I need the "as" and "bs" in one vector as <- apply(ys, function(c(a,b)) a) bs <- apply(ys, function(c(a,b)) b) Can you help me with the correct syntax, instead of my pseudo code? thx Christof
2012 Jul 21
1
alternative to rbind for data.table
Hi I want to add a row to a "data.table" in each round of a for loop. "rbind" seems to be a inefficient way to implement this. How would you do this? The "slow" solution: library(data.table) Rprof("test.out") dt <- data.table() for (i in (1:10000)) { # algorithm that generates a list with different values, # but same key-names, each round, for
2013 Jul 23
1
optimize integer function parameters
Hi I have "observations" obs <- (11455, 11536, 11582, 11825, 11900, ...) and a simulation function f(A,B,C,D,E,F), so sim <- f(A,B,C,D,E,F) e.g. sim = c(11464, 11554, 11603, 11831, 11907, ...) now I would like to fit A,B,C,D,E,F such that "obs" and f(A,B,C,D,E,F) match as well as possible. A,..,F should be integers and have bounds. How would you solve this problem
2012 Jan 20
3
break an axis.POSIXct
Hi I like to use "axis.POSIXct" to plot days from 2006 till 2008. But I only have datas for the summer months. Is it possible to get two axis breaks, to have not so long distances without points? thx Christof
2012 Jan 09
2
RODBC vs gdata
Hi one col in my Excel file contains many numbers. But on line 3000 and some other lines are strings like "FG 1". "RODBS" seems to omit this lines. "gdata" works, but is much slower. Is this a bug of RODBC or do I apply it wrong? Example with the same "file.xlsx" library(RODBC); excel <- odbcConnectExcel2007("file.xlsx") tab <-
2011 Nov 26
2
simplify source code
Hi I would like to shorten mod1 <- nls(ColName2 ~ ColName1, data = table, ...) mod2 <- nls(ColName3 ~ ColName1, data = table, ...) mod3 <- nls(ColName4 ~ ColName1, data = table, ...) ... is there something like cols = c(ColName2,ColName3,ColName4,...) for i in ... mod[i-1] <- nls(ColName[i] ~ ColName1, data = table, ...) I am looking forward to help Christof
2012 Oct 02
3
lattice xyplot, get current level
Hi xyplot(y ~ x | subject) plots a separate graph of y against x for each level of subject. But I would like to have an own function for each level. Something like xyplot(y ~ x | subject, panel = function(x,y) { panel.xyplot(x,y) panel.curve(x,y) { # something that dependents on the current subject ... } }) How I get the current
2003 Feb 20
2
is.numeric
Hi, I have a vector, which contains both strings and numbers, e.g. > foo <- c("str1",1234,"str2",0.9876) I want to know if a distinct element of the vector is a string or a number and took "is.numeric", but > is.numeric(foo[2]) [1] FALSE because R treats the numbers in a mixed vectors as strings: > foo [1] "str1" "1234"
2004 Nov 01
5
make apply() return a list
Hi, I have a dataframe (say myData) and want to get a list (say myList) that contains a matrix for each row of the dataframe myData. These matrices are calculated based on the corresponding row of myData. Using a for()-loop to do this is very slow. Thus, I tried to use apply(). However, afaik apply() does only return a list if the matrices have different dimensions, while my matrices have
2004 Nov 29
3
systemfit - SUR
Hello to everyone, I have 2 problems and would be very pleased if anyone can help me: 1) When I use the package "systemfit" for SUR regressions, I get two different variance-covariance matrices when I firstly do the SUR regression ("The covariance matrix of the residuals used for estimation") and secondly do the OLS regressions. In the manual for "systemfit" on page