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
print(paste(rmse,TS0,TS1,TS2,TB0,TB1,TB2))
act <- rmse
}
}
Am 23-07-2013 13:20, schrieb Enrico Schumann:
On Tue, 23 Jul 2013, Christof Kluß writes:
I have "observations" obs <- (11455, 11536, 11582, 11825, 11900, ...)
and a simula
Hi
is there a way to generate a pdf, e.g. pdf("test.pdf"), even if the file
"test.pdf" is open? (e.g. with acrobat)
i.e. I would have to close "test.pdf" in the viewer without any user
interaction, than override the file and maybe open it again.
thx
Christof
___
Hi
I would like to read table data from a text-files with extra
informations in the header (of unknown line count). Example:
informations (unknown count of lines)
... and at some point the table
--
year month mday value
2013 1 16 0
...
If it was an excel fi
3 1 16 0 "))
# This is it
i <- grep("^year", x)
read.table(textConnection(x[i:length(x)]), header = TRUE)
Hope this helps,
Rui Barradas
Em 16-01-2013 14:17, Christof Kluß escreveu:
Hi
I would like to read table data from a text-files with extra
informations in the header
rg/hbLite.R";)
hbLite("R.filesets")
/Henrik
On Thu, Jan 17, 2013 at 1:34 AM, Christof Kluß wrote:
Hello
thank you for the fast and helpful answer! Now the following works fine for
me
x <- readLines(filename)
i <- grep("^year", x)
dlf <- read.table(textConne
Hi
there are some good tips in "The R Inferno"
http://www.burns-stat.com/documents/books/the-r-inferno/
or connect C++ to R with Rcpp
http://dirk.eddelbuettel.com/code/rcpp.html
or byte code compiler (library(compiler))
or library(data.table)
but do you have an idea to fasten standard R source c
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
r.
Christof
Am 17-09-2012 22:52, schrieb Thomas Lumley:
> On Mon, Sep 17, 2012 at 6:27 PM, Christof Kluß
> wrote:
>> but for performance "eval(parse(a))" should not be evaluated at each
>> function call, but should work as
>>
> You can do it with bquote()
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" sho
locations as
> fixed. With only 5, you don't have enough information to estimate the
> variance component with any precision anyway.
>
> 3. Feel free to ignore (2) and defer to the experts at (1).
>
> Cheers,
> Bert
>
>
> On Tue, Sep 25, 2012 at 8:52 AM, Chris
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
subj <- levels(subject)
subj[panel.number()]
seems to be a good solution
is there something like panel.legend (instead of panel.text)?
Am 02-10-2012 12:59, schrieb Christof Kluß:
> Hi
>
> xyplot(y ~ x | subject) plots a separate graph of y against x for each
> level of subje
Hi
is there a comfortable way to mark periods on time chart (axis.Date)?
To do it with arrows(...), seems to be irritating.
I want to have something like
<---winter--><--spring--><--summer-->
thx
Christof
__
R-help@r-project.org mailing list
https:/
Hello Rui Barradas
thank you very much. That is exactly what I was looking for.
Christof
Am 20-10-2012 14:19, schrieb Rui Barradas:
> library(zoo)
>
> arrowsRange <- function(from, to, at = 1, labels = NULL,
> length = 1/8, horizontal = TRUE, border = FALSE, ...){
> require(plotrix)
>
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 wh
Hi,
we have a function that calculates a value for each day of the year.
For example an iterative function like
actvalue_0 := 0
actvalue_ {t+1} := actvalue_t + f(param_1,param_2,actvalue_t)
and for some days we have measurements. Now we want to choose param_1
and param_2 so that the function va
Hi,
we want to calculate a linear regression that results from three test
series. (The "Average linear regression" over 3 replication.)
Each test serie consists of the values for 3 times (0min, 25min,
50min) and is repeated three times.
We need such a regression for each combination of subject
Probably the question fits better in the lme4 mailing list, so I
forwarded it.
Original-Nachricht
Betreff: linear regression with replication
Datum: Mon, 23 May 2011 16:31:54 +0200
Von: Christof Kluß
An:
Newsgruppen: gmane.comp.lang.r.general
Hi,
we want to calculate a
Hi,
mod <- lme(A ~ -1 + B+C+D+E+F+G, random = ~1 | ...)
results in summary(mod)$coeff
B C D E F G (Intercept)
b c d e f g i
Now I'm interested in the function
f <- function(B,C,D,E,F,G) <- {
return(i + b*B + c*C + d*D + e*E + f*F + g*G)
}
Is there a easier way to create such function with f
Hi
is there a easy way to get something like
http://addictedtor.free.fr/graphiques/graphcode.php?graph=137
pairs(USJudgeRatings[,c(2:3,6,1,7)],
lower.panel=panel.smooth, upper.panel=panel.cor)
but without the "lower.panel" (and without numbers and ticks at the border.)
thx
Christof
_
Hi
is there a command that calculates the correct adjusted R-squared, when
I work without intercept? (The R-squared from lm without intercept is
false.)
Greetings
Chrsitof
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-hel
run a regression I like to have the R² of the regression line and
not something else. ;)
Am 27-06-2012 10:25, schrieb Uwe Ligges:
>
>
> On 27.06.2012 09:33, Christof Kluß wrote:
>> Hi
>>
>> is there a command that calculates the correct adjusted R-squared, when
>&g
run a regression I like to have the R² of the regression line and
not something else. ;)
Am 27-06-2012 10:25, schrieb Uwe Ligges:
>
>
> On 27.06.2012 09:33, Christof Kluß wrote:
>> Hi
>>
>> is there a command that calculates the correct adjusted R-squared, when
>&g
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
And now with data.frames
> result <- lapply(conds, fun, DF)
>
> Reduce(`&`, result) # combine the results
> Reduce(`|`, result) #
>
>
> Hope this helps,
>
> Rui Barradas
>
> Em 02-07-2012 18:04, Christof Kluß escreveu:
>> Hi
>>
>> how would
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:1)) {
# algorithm that generates a list with dif
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(
Hi Ken
Am 14-08-2012 11:50, schrieb ken knoblauch:
> Christof Kluß email.uni-kiel.de> writes:
>
>> But now I search a self-starter for y = a + b * c^x
>
> You might be able to adapt the SS.calib function
> from the psyphy package for this.
> It was designed to
Am 14-08-2012 19:40, schrieb Peter Ehlers:
> On 2012-08-14 00:09, Christof Kluß wrote:
>> But now I search a self-starter for y = a + b * c^x
> Can't you just reparameterize with c^x = exp(x * log(c)) ?
oh, I've missed this... thank you very muc
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]
Hi
is there a way to append a plot as PDF to an existing PDF file?
savePlot seems not to have this possibility.
Christof
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-pr
Hi Dennis,
thank you very much. That works fine.
Is there a possibility that R continue even if one of the models is not
solvable? R currently terminates with an error message.
greetings
Christof
Am 27-11-2011 01:34, schrieb Dennis Murphy:
vars<- c('y1', 'y2', 'y3')
# Function to create t
Hi Jim, Hi Ken
Am 27-11-2011 00:00, schrieb jim holtman:
There is the 'pdftk' (PDF tool kit) that you will find on the web that
will do the job. I have used it to both combine and split out the
pages in the PDF file.
yes, thx. GUI tools like www.pdfsam.org do the job too. But is there a
poss
t;C1"]!)
Can you give me a hint?
greetings
Christof
Am 26-11-2011 23:30, schrieb Christof Kluß:
Hi
I would like to shorten
mod1 <- nls(ColName2 ~ ColName1, data = table, ...)
mod2 <- nls(ColName3 ~ ColName1, data = table, ...)
mod3 <- nls(ColName4 ~ ColName1, data = table, ...
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
Am 09-12-2011 12:54, schrieb Sarah Goslee:
>> myfunc<- function(x) {a=x; b=x-1; c(a, b) }
>> ys<- sapply(1:5, myfunc)
>> ys
> [,1] [,2] [,3] [,4] [,5]
> [1,]12345
> [2,]01234
>
> And from there, it's not at all clear what you mean by "one vector" -
> i
Hi,
first a happy new year ;)
I would like to plot the regression lines of a model like
lme <- lme(conc ~ name/time - 1,
random=conc~time|nr,method="ML",data=measurements)
Ideally a seperate plot for each regression line (respectively name) and
seperate colors for the measurements (nr).
H
Am 02-01-2012 10:54, schrieb ken knoblauch:
Christof Kluß email.uni-kiel.de> writes:
lme<- lme(conc ~ name/time - 1,
random=conc~time|nr,method="ML",data=measurements)
see plot.augPred in the nlme package
thx, but how to set "primary"? I always get t
Hi
I want to do something like
a <- c(10,20,15,43,76,41,25,46)
tab <- data.frame(a)
name <- "a"
for (v in unique(tab[[name]])) {
r <- subset(tab, name==v) # this does not work
...
}
i.e. a "string" on the left side of the select expression (subset). How
could I solve this?
thx
Christof
Hi
the output should look like r <- subset(tab, a==v)
but now I have something like r <- subset(tab, "a"==v)
and r <- subset(tab, [["a"]]==v)
does not work :(
greetings
Christof
Am 05-01-2012 16:51, schrieb Christof Kluß:
> Hi
Hi
thank you very much for your useful answers! In this case I solved it
with Sarah's suggestion
tab[tab[[name]] == v,]
that works fine
Greetings
Christof
Am 05-01-2012 16:51, schrieb Christof Kluß:
> Hi
>
> I want to do something like
>
> a <- c(10,20,1
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 <- odbcC
ShowDoc("RODBC", package="RODBC")
>
> Regards,
> Enrico
>
>
> Am 09.01.2012 19:02, schrieb Christof Kluß:
>> Hi
>>
>> one col in my Excel file contains many numbers. But on line 3000 and
>> some other lines are strings like "FG 1&qu
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
__
R-help@r-project.org mailing list
https:
Hi
for each measurement day we use "lme" for our four repetitions. Now it
would be great if we can represent the error too.
The following seems to be good. Unfortunately, there is not the full
example source code. Maybe someone has done it before.
(from http://anthony.darrouzet-nardi.net/science
Hi,
I want to plot with axis.Date(), but something is scaled incorrectly.
The red vertical line in is put on a totally wrong position. (sample below)
Do you have an idea what I'm doing wrong?
Thx
Christof
x11(width=30, height=20)
x<-seq(as.Date("2010-02-27"), as.Date("2011-03-28"),"month")
y
Hi,
I want to plot with axis.Date(), but something is scaled incorrectly.
The red vertical line in is put on a totally wrong position. (sample below)
Do you have an idea what I'm doing wrong?
Thx
Christof
x11(width=30, height=20)
x<-seq(as.Date("2010-02-27"), as.Date("2011-03-28"),"month")
y
48 matches
Mail list logo