[R] Extraction of forecats from VAR prediction

2014-06-03 Thread Jonas Ulbrich
Hi, my question is the following one: predict(VAR(y,p=1,type="none"),n.ahead=500) How can I extract the forecasts of this prediction? y is a dataset of four parameters with 500 values each.One parameter for instance is lambda the head looks like this: $lambda fcst lower

[R] Yield Curve Package Svensson

2014-06-03 Thread Jonas Ulbrich
10,20,30). Spot is the sort of interest rate I want to determine. The error request I receive now is: Error in hasTsp(x) : invalid time series parameters specified. How fix this concrete case? I have not found an example to that. Best Regards Jonas

[R] Loop Autoregression

2014-06-01 Thread Jonas Ulbrich
Hello everybody, I have to confess that I am relatively new to R. My problem is the following one: I have a data set of 500 values. For each value I wanna make prediction of four steps ahead via autogregression. Because I have to repeat this procedure on three other data sets I wanna make a lo

[R] Independent variable dependent on offset in GLMM

2013-11-25 Thread Jonas Josefsson
around? Thanks, Jonas Jonas Josefsson (PhD student) Swedish University of Agricultural Sciences (SLU) Department of Ecology Box 7044 750 07 Uppsala Sweden jonas.josefs...@slu.se<mailto:jonas.josefs...@slu.se> 0046 (0)18

Re: [R] creating variable that codes for the match/mismatch between two other variables

2013-02-25 Thread Jonas Walter
ying your procedure. Thanks again! Best, Jonas Zitat von PIKAL Petr : Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Jonas Walter Sent: Monday, February 25, 2013 2:38 PM To: r-help@r-project.org Subject: [R] creatin

[R] creating variable that codes for the match/mismatch between two other variables

2013-02-25 Thread Jonas Walter
nes. min(mydat$match) [1] 1 > max(mydat$match) [1] 1 # example: row 1699: no match Stimulus - Prediction mydat$Stimulus[1699] == mydat$Prediction[1699] # [1] FALSE # but: mydat$match[1699] # [1] 1 How can I get the right coding? Where is the mistake? Thanks! Best, Jonas Walter

[R] adjust font in ggplot2 to LaTeX document

2012-10-01 Thread Jonas Stein
e a binary font file? Can someone give me a link to an example? Kind regards and thanks a lot, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/po

[R] how to qplot two x-axis x1:Farenheit x2:Celsius

2012-09-12 Thread Jonas Stein
Hi, how can i plot two different x axis in a ggplot2 qplot? I want to plot Farenheit and Celsius in one diagram. x1:Farenheit x2:Celsius kind regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] qplot with many files (each one curve)

2012-09-10 Thread Jonas Stein
he classic "plot' command i could add the curves with something like for... { data<-read.csv points(data$x, data$y, col=myrainbow, type="l") } How would you solve it in ggplot? Kind regards, -- Jonas Stein __ R-help

[R] Class-attribute and method dispatch for the function-class

2012-08-22 Thread Jonas Rauch
ion like sum and a copy mysum: > mysum <- sum > is.object(sum) [1] FALSE > is.object(mysum) [1] FALSE If we change the class of mysum, the original function sum becomes an object, too! > class(mysum)<-class(mysum) > is.object(mysum) [1] TRUE > is.object(sum) [1] TRUE Is th

[R] igraph: Turn multiple edges into weights

2012-08-14 Thread Jonas Michaelis
Dear all, I have some network data - about 300 vertices and several thousand edges. I am looking for a way to turn multiple edges into weights of the edges. I looked around and - surprisingly? - haven't found anything. Is there an easy way to do this? Best, Jonas [[alternative

[R] ggplot2 geom_bar produces white slashes in legend keys

2012-08-10 Thread Jonas Hal
R vers. 2.15.0 and ggplot 0.9.1, win xp Best wishes Jonas Hal _ BRFkredit sender e-mails og vedhaeftede dokumenter i ikke-krypteret form. Hvis du ikke ?nsker at

Re: [R] sweave problem with special danish characters

2012-08-08 Thread Jonas Hal
I am using win xp, R 2.15.0 and texi2dvi from the tools package. Regards Jonas -Oprindelig meddelelse- Fra: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sendt: 8. august 2012 16:43 Til: Jonas Hal Cc: r-help@r-project.org Emne: Re: [R] sweave problem with special danish characters On

[R] sweave problem with special danish characters

2012-08-08 Thread Jonas Hal
c} \begin{document} This doesn't æ ø å and pdf document only contains NA \end{document} Any suggestions? Best wishes Jonas Hal _ BRFkredit sender e-mails o

Re: [R] nls problem: singular gradient

2012-07-12 Thread Jonas Stein
On 07/12/2012 01:39 AM, Duncan Murdoch wrote: On 12-07-11 2:34 PM, Jonas Stein wrote: Take a look at the predicted values at your starting fit: there's a discontinuity at 0.4, which sure makes it look as though overflow is occurring. I'd recommend expanding tanh() in terms of expone

Re: [R] nls problem: singular gradient

2012-07-11 Thread Jonas Stein
low. > > Duncan Murdoch Hi Duncan, Thank you for your suggestion. I wrote a function "mytanh" and nls terminates a bit later with another error message: Error in nls(data = dd, y ~ 1/2 * (1 - mytanh((x - ttt)/1e-04) * exp(-x/tau2)), : number of iterations exceeded maximum of

[R] nls problem: singular gradient

2012-07-11 Thread Jonas Stein
E) # get error: # Error in nls(data = dd, y ~ 1/2 * (1 - tanh((x - ttt)/smallc) * exp(-x/tau2)), : # singular gradient -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide h

[R] Figuring out encodings of PDFs in R

2012-06-26 Thread Jonas Michaelis
Dear list, I am currently scraping some text data from several PDFs using the readPDF() function in the tm package. This all works very well and in most cases the encoding seems to be "latin1" - in some, however, it is not. Is there a good way in R to check character encodings? I found the functio

[R] cairo_pdf() vs. pdf() what is the difference?

2012-04-16 Thread Jonas Stein
cairo_pdf() vs. pdf() what is the difference between them and which one would you suggest to use in combination with pdflatex? kind regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] how to plot 2d matrix as coloured squares?

2012-04-10 Thread Jonas Stein
regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] identify and delete in table

2012-02-27 Thread Jonas Fransson
important. Thanks, Jonas Fransson Ph.D.stud. IVA / Det Informationsvidenskabelige Akademi Royal School of Library and Information Science Birketinget 6 DK-2300 Copenhagen S T +45 32 58 60 66 D +45 32 34 15 10 www.iva.dk/jf __ R-help@r-project.org mailing

[R] fit data to y~A+B*sin(C*x)

2012-02-14 Thread Jonas Stein
ta object nlmod <- nls(X ~ A+B*sin(C* Y), data=mydata, start=list(A=2, B=4, C=1), trace=TRUE) # this nls fit fails. Who can help me to fit this type of data? Kind regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.eth

Re: [R] how to plot a nice legend?

2012-02-11 Thread Jonas Stein
and we can see the code used. sure http://www.r-bloggers.com/ggheat-a-ggplot2-style-heatmap-function/ kind regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide htt

Re: [R] how to plot a nice legend?

2012-02-11 Thread Jonas Stein
gend like this in a standard plot like plot(1:10) too? http://www.r-bloggers.com/wp-content/uploads/2011/03/heatmap.png kind regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] how to plot a nice legend?

2012-02-11 Thread Jonas Stein
s for the text need adjustment (linespacing is quite large and so on) Is there an alternative to legend()? Is it possible to place the legend() outside of the plot area? Kind regards, -- Jonas Stein __ R-help@r-project.org mailing list

[R] The "less than" (<) operator doesnt seem to perform as expected

2012-02-02 Thread Jonas Hal
sequence at 0.5. > l <- 0.6 > u <- seq(0.5, 0.7, 0.1) > u [1] 0.5 0.6 0.7 > mygrid <- expand.grid("l" = l, "u" = u) > mygrid l u 1 0.6 0.5 2 0.6 0.6 3 0.6 0.7 > mygridcollapsed <

Re: [R] R package dev: how to export constant?

2012-01-19 Thread Jonas Stein
> Jonas, I've just seen your function 'sistring' code and it's different from > the code in Thanks a lot for reporting this bug. It is fixed now in the git repository. I added some examples, but they do not work: R CMD check sitools = snip >

Re: [R] R package dev: how to export constant?

2012-01-18 Thread Jonas Stein
On 2012-01-18, William Dunlap wrote: > Try adding > LazyData: yes > to the DESCRIPTION file. >> [3] https://github.com/jonasstein/sitools Thank you. Now it works and I could add all SI prefixes. -- Jonas Stein __ R-help@r-proj

[R] R package dev: how to export constant?

2012-01-17 Thread Jonas Stein
] kind regatds, [1] https://github.com/jonasstein/sitools/blob/master/init.R [2] https://github.com/jonasstein/sitools/downloads [3] https://github.com/jonasstein/sitools -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] howto test a package without installation

2012-01-17 Thread Jonas Stein
> I don't believe you can. However, you need not install it into a system-wide > library directory... your personal library (e.g. > /home/jonas/R/x86_64-pc-linux-gnu-library/2.14) should be sufficient. Finally i created a new testuser to install the library locally as you w

Re: [R] howto test a package without installation

2012-01-17 Thread Jonas Stein
to directory ‘/usr/local/lib/R/site-library’ R tries to install something in my system. That may confuse my debian packagemanagement. kind regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

[R] howto test a package without installation

2012-01-15 Thread Jonas Stein
3 * kilo [1] 3000 [*] https://github.com/jonasstein/sitools -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and prov

Re: [R] par.plot() for repeated measurements

2012-01-14 Thread Jonas Stein
,ylim=c(45,184),ylab='FACIT-PAL',xlab='Time > to death',color=FALSE,lwd=1) i can not use your example, as i have no enable2r.csv, but perhaps you have luck if you change xlab='Time to death' to xlab="Time to death

Re: [R] find inflexion point of discrete value list with R

2012-01-13 Thread Jonas Stein
ite set of points you can at least deal with it > exhaustively. my real data is not limited to integer. Do you know a ready to use code example for this? Would it be a good idea to create a function and make it public to the community? And if yes as single .R file, or as a library? kind rega

Re: [R] Rpad.org down? Searching latest R-Reference card

2012-01-12 Thread Jonas Stein
Paradis (R for Beginners) I have uploaded the source to https://github.com/jonasstein/R-Reference-Card It is my favourite R Reference Card and I am looking forward to recieve your suggestion for improvement. Is there a prominent place where i should push the compiled .PDF to? Kind regards, --

[R] Rpad.org down? Searching latest R-Reference card

2012-01-10 Thread Jonas Stein
Hi, i'd like to update my R-Reference card and commit some edits, but i could not get the source from rpad.org Did it move? kind regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] automatic SI prefixes as ticklabels on axis

2012-01-05 Thread Jonas Stein
On 2012-01-05, Jonas Stein wrote: > i want to plot values with frequency on a logarithmic x axis. > similar to this example that i found in the web: > http://www.usspeaker.com/jensen%20p15n-graph.gif > > I would like to convert long numbers to si prefix notation > like in the e

[R] wish: enable joining this Mailinglist via Gmane

2012-01-05 Thread Jonas Stein
thing like mailman does here https://stat.ethz.ch/mailman/listinfo/r-help If he can reply he will be permanently accepted as member. If you like this idea, could the responible person check the optionflag in gmane? Kind regards, -- Jonas Stein __ R

[R] automatic SI prefixes as ticklabels on axis

2012-01-05 Thread Jonas Stein
create labels by hand, but i have many files so i need some automatic function. Has anyone done that in R? Kind regards and thank you for your help, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] find inflexion point of discrete value list with R

2012-01-02 Thread Jonas Stein
i have a list of values like this x y 1 3 2 2 3 3 4 4 5 5 6 4 7 3 8 2 9 3 and need the inflexion points (and all max and min). Is there a nice way to get the local max, min and inflexion points? kind regards, -- Jonas Stein __ R-help@r-project.org

Re: [R] How to speed up int2bin conversion?

2011-12-01 Thread Jonas Jägermeyr
system.time(int2bin(x)) user system elapsed 0.310.000.32 On Thu, Dec 1, 2011 at 7:14 AM, Jonas Jägermeyr wrote: Dear R-help members, I'm processing a large amount of MODIS data where quality assessment information is stored as an integer value for each pixel. I have to converte

[R] How to speed up int2bin conversion?

2011-12-01 Thread Jonas Jägermeyr
ndigits-q+1] <- (x %% 2) x <- (x %/% 2) } bin<- apply(base,1,paste,collapse="") return(bin) } Since it is still slow, I have to find a way to express this more elegantly. I'd really appreciate any help. Thanking you, with best regards Jon

Re: [R] match first consecutive list of capitalized words in string

2011-11-11 Thread Richter-Dumke, Jonas
Thank you very much for your help. I'm using the second suggestion in my program and it works very well. Jonas -Original Message- From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Sent: Thu 11/10/2011 5:58 AM To: Richter-Dumke, Jonas Cc: r-help@r-project.org Subject: R

[R] match first consecutive list of capitalized words in string

2011-11-08 Thread Richter-Dumke, Jonas
irck Kleve", "Bernardus Engelb Franciscus Linde")? This expression would very reliably seperate the person names from the additional information in my historic church register transcription. Thank you very much for your effort, Jonas -- This mai

[R] listing all occurrences in a vector

2011-10-19 Thread Jonas Fransson
umn or a vector where all the DEPTHs are listed: 2, 3, 3, 2, 2, 2, 5 (NUMBER=1 in all cases). Is there any simple solution to the problem? Thanks, Jonas Jonas Fransson Ph.D.stud.   IVA / Det Informationsvidenskabelige Akademi Royal School of Library and Information Science Birketinget 6 DK-2300 C

Re: [R] position of first and last axis tick

2011-10-17 Thread Jonas Stein
m(25),rnorm(25), xaxs ="i", yaxs="i", xlim=c(-2,2), > ylim=c(-2,2)) That is exactly what i have been looking for. Thank you. >> [1] >> http://commons.wikimedia.org/wiki/File:Atmospheric_radiocarbon_1954-1993.svg -- Jonas Stein

[R] position of first and last axis tick

2011-10-16 Thread Jonas Stein
regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Multilevel model in lme4 and nlme

2011-09-13 Thread jonas garcia
ta<- data.frame(y,x,a,b,c) mod1<- lmer(y ~ x + (1|a:b) + (1|b:c), data=mydata) mod2.lme<- lme(y ~ x, random=list(a=~1, b=~1, c=~1), data=mydata) mod2.lmer<- lmer(y ~ x + (1|a) + (1|a:b) + (1|a:b:c), data=mydata) My objective is to specify mod1 using function lme. Anyone knows how

[R] Multilevel model in lme4 and nlme

2011-09-12 Thread jonas garcia
nslate mod1 into lme language? Any help on this would be much appreciated. Jonas [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-p

[R] Inversions in hierarchical clustering were they shouldn't be

2011-07-27 Thread Jonas Dehairs
Hi, I'm using heatmap.2 to cluster my data, using the centroid method for clustering and the maximum method for calculating the distance matrix: library("gplots") library("RColorBrewer") test <- matrix(c(0.96, 0.07, 0.97, 0.98, 0.50, 0.28, 0.29, 0.77, 0.08, 0.96, 0.51, 0.51, 0.

[R] references in R

2011-05-24 Thread Jonas Zierer
entries and merging them...but there must be a better solution, or?) thx. bye Jonas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] Sample or Probability Weights in LM4, NLME (and PLM) package

2011-03-10 Thread Arne Jonas Warnke
Dear all, First, I would like to thank you for your immense work. My question is about a frequent topic which I am not able to solve - even after hours of search in the mailing lisy. I would like to analyse random-effects (and fixed-effects)models of longitudinal / panel data with sampling wei

[R] Plot with same font like in LaTeX

2011-03-02 Thread Jonas Stein
to try it again now. kind regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] calculate area between intersecting polygons

2010-10-27 Thread jonas garcia
Many thanks for your help! Thanks to you guys I manage to solve my problem in an efficient way All the best J On Tue, Oct 26, 2010 at 11:04 PM, Remko Duursma wrote: > > I don't know why I forgot that you can do this as well : > > area.poly(intersect(p1,p2)) > > ... a bit more straightforward. >

Re: [R] calculate area between intersecting polygons

2010-10-26 Thread jonas garcia
there any other package that does this? Thanks On Tue, Oct 26, 2010 at 3:38 AM, Remko Duursma wrote: > > Dear Jonas, > > if you can write the difference in y-values between your polygons as a > function, you can use > integrate() to get the area between the polygons. > > It sou

[R] calculate area between intersecting polygons

2010-10-25 Thread jonas garcia
orward algorithm to calculate the intersection area between polygons poly1 and poly2? Thank you so much in advance Jonas [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] remove black square from factor plot

2010-10-22 Thread Jonas Josefsson
n bxp help page. Regards Petr http://img51.imageshack.us/img51/9011/plott.jpg Jonas 2010-10-20 17:14, David Winsemius skrev: On Oct 20, 2010, at 10:45 AM, fugelpitch wrote: I have a factor which is species and the variables are a few sites where this species live. When I p

[R] help identifying clusters

2010-10-20 Thread jonas garcia
are clearly clustered (in this example there are 3 clusters). Is there any R algorithm that allows me to identify the three groups of points and allocate to each pair the respective cluster? Many thanks in advance Jonas [[alternative HTML version dele

Re: [R] remove black square from factor plot

2010-10-20 Thread Jonas Josefsson
img51/9011/plott.jpg Jonas 2010-10-20 17:14, David Winsemius skrev: On Oct 20, 2010, at 10:45 AM, fugelpitch wrote: I have a factor which is species and the variables are a few sites where this species live. When I plot: plot(species.factor, minlatitudemaxlatitude) the plot produced is autom

[R] boxplot issue

2010-10-15 Thread Jonas Josefsson
the two values... Thanks! Jonas Josefsson __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] R editor in ubuntu!

2010-10-05 Thread Jonas Josefsson
I can recommend RKWard which is more than an editor but is great. There is also an option to patch gedit to send commands, but it was to much of a hassle to set up to be of interest to me at least. Jonas 2010-10-05 15:52, Mehdi Zarrei skrev: Hello R-Users! I am looking for an editor to be

[R] calculating mean and s.d. from a two-column table

2010-09-27 Thread Jonas Josefsson
I have a two-column table as follows where age is in the 1st column and the number of individuals is in the 2nd. age;no 1;21 2;31 3;9 4;12 5;6 Can I use mean() and sd() to calculate the mean and standard deviation from this or do I have to manually multiplicate 21*1+31*2 etc. / N? _

[R] make changes in existing vector with the apply function?

2010-09-27 Thread Jonas Sundberg
te(PrH[i]) == F & tempHER > tempSPR) {PrH[i] <- 1 } if (is.finite(PrH[i]) == F & tempHER < tempSPR) {PrH[i] <- 0 }} PrH, tempSPR and tempHER are equally long vectors.  Thanks in advance!Jonas [[alternative HTML version deleted]] ___

[R] performing script on multiple files

2010-09-24 Thread Jonas Josefsson
say that I have a script that uses read.csv to read a textfile in a certain directory, then transforming the data a bit and then spit out a new file in an output directory. Is it possible to make this universal so the same procedure is made for all files in a certain directory and also make it s

[R] color of lines while printing through for loop

2010-09-24 Thread Jonas Josefsson
I am trying to find a convenient way to control line colors when printing from a for loop using the lines command. Right now I have solved this by creating a colors vector that is refered to in the loop with index. However, the colors choosen here are just 1,2,3,4,5... I would like to get colo

Re: [R] Problem with any()

2010-09-24 Thread Jonas Mandel
Hello, try this way : any(as.integer(c(1, 3))==3) cheers, Jonas Christofer Bogaso a écrit : > Hi I have following line of code: > >> any(as.integer(c(1, 3))) == 3 > [1] FALSE > > Shouldn't I expect it is true? > > Thanks, > > ___

Re: [R] referencing last row in a column

2010-09-23 Thread Jonas Josefsson
Yes, thanks! :) 2010-09-23 11:55, Ivan Calandra skrev: >Hi, > xlim and ylim should be given the extremes only: > > plot(x,y, xlim=c(pheno.dt$year[1],pheno.dt$year[nrow(pheno.dt)]), > ylim=c(50,150), xlab="Year", ylab="Julian Day") >^^

Re: [R] Subtraction loop

2010-06-28 Thread Jonas Mandel
Hello, Check the function diff() it can do it for you, no need for a loop. Cheers, Jonas Mandel ecvet...@uwaterloo.ca a écrit : > I have a data frame with 2 columns, one for day and one for average. The > day starts at 97 all the way to 279. I want to subtract day 98 average- > day 9

[R] Latex outputs of multilevel models

2010-06-22 Thread Jonas Michaelis
Hi, I have a number of multilevel models and I would like some Latex outputs of them. I usually use the "apsrtable" package, but it does not accept "lme" outputs. Neither does the "mtable" function in the "memisc" package. Is there any good altern

[R] Latex outputs of multilevel models

2010-06-21 Thread Jonas
Hi, I have a number of multilevel models and I would like some Latex outputs of them. I usually use the "apsrtable" package, but it does not accept "lme" outputs. Neither does the "mtable" function in the "memisc" package. Is there any good alterna

Re: [R] Problems using allEffects() (package effect)

2010-06-18 Thread Jonas Mandel
s not at all balanced : > table(data$Série, data$Traitemen) 1 2 3 7 0 28 31 8 24 17 0 In batch 7 there is no mouse treated with treatment 1, and in batch 8 there is no mouse treated with treatment 3. Maybe the error come from here, even if lm() is fine with this ? Cheers, Jonas

Re: [R] Problems using allEffects() (package effect)

2010-06-18 Thread Jonas Mandel
, components], 1, prod) : index out of range In the example given in the help page there are factor variables and numeric variables so I don't think the problem comes from here. Any help is welcome here. Cheers, Jonas Joris Meys a écrit : > Please, read the posting guide: > - provide a minim

[R] Problems using allEffects() (package effect)

2010-06-17 Thread Jonas Mandel
t this error: > eff.lm1 <- allEffect(mod=lm1, Error in apply(mod.matrix[, components], 1, prod) : index out of range I read the help and the example but I don't understand the reason why it doesn't work. Can you help me ? Thanks -- Jonas Mandel _

Re: [R] End of line marker?

2010-03-05 Thread jonas garcia
gt;> On 04/03/2010 10:32 PM, David Winsemius wrote: >>> >>>> On Mar 4, 2010, at 9:47 PM, jonas garcia wrote: >>>> >>>>> When I opened the file with a hex-editor, the problematic character >>>>> turned out to be “1a” >>&

Re: [R] End of line marker?

2010-03-04 Thread jonas garcia
e in a binary/raw, finding the > offending character and replacing it with a blank (or whatever and > then writing the file back out). You can then probably process it > using read.table.; > > On Thu, Mar 4, 2010 at 12:50 PM, jonas garcia > wrote: > > Thank you so much for your rep

Re: [R] End of line marker?

2010-03-04 Thread jonas garcia
go for text editors separately. Help on this would be much appreciated. Thanks again J On 3/4/10, David Winsemius wrote: > > > On Mar 3, 2010, at 2:22 PM, jonas garcia wrote: > > Dear R users, >> >> I am trying to read a huge file in R. For some reason, only a

[R] End of line marker?

2010-03-03 Thread jonas garcia
= header, sep = sep, quote = quote, : incomplete final line found by readTableHeader on 'new3.dat' I am working with R 2.10.1 in windows XP. Thanks in advance Jonas [[alternative HTML version deleted]] __ R-help@r-project.org mai

[R] Number with fixed digit length - zero fill-up

2010-02-01 Thread Jägermeyr , Jonas
10) to a 8-digit zero fill-up (x = 00010110) in order to address digit indices? Or other way round, how can I make the 'substr' function to count from the right hand side? Thank you. With kind regards, Jonas Jägermeyr Department of Geography Humboldt-University of Berlin jonas.jaegerm

Re: [R] axis labels

2009-10-14 Thread jonas garcia
e but with opposing > orientation. > > Try fooling about with the mgp argument in axis(): > > par(mfrow=c(1,1), cex.axis = 0.5, cex.lab = 0.5) > plot(1,1, axes = F) > axis(1, mgp=c(3,0.7,0)) > axis(2, mgp=c(3,1,0)) > > >>> jonas garcia 10/13/09 5:58 PM >>> &

[R] axis labels

2009-10-13 Thread jonas garcia
, cex.lab = 0.5) plot(1,1, axes = F) axis(1) axis(2) Thanks in advance Jonas [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] help with functions

2009-09-05 Thread jonas garcia
get, env=env)) > } > > testA() > > But more generally, I doubt your construct using assign and get is the most > natural way to reach your goal in R. > > HTH, > > baptiste > > > 2009/9/4 jonas garcia > >> Hi all, >> >> >> >> I ha

[R] help with functions

2009-09-04 Thread jonas garcia
they both work... Why is this? Thanks in advance Jonas testA<-function(input) { dat<- data.frame(A=seq(input,5), B=seq(6,10)) vec.names<- c("a", "b") for(i in 1:ncol(dat)) { tab<- dat[,i]-1 assign(vec.name

Re: [R] cbind objects using character vectors

2009-09-02 Thread jonas garcia
Thanks Erik and Henrique, That's what I was after. Jonas On Tue, Sep 1, 2009 at 8:08 PM, Henrique Dallazuanna wrote: > Try this: > > > sapply(vec.names, get) > > But for this example, you don't need for, try: > > > dat - 1 > > On Tue, Sep 1, 20

[R] cbind objects using character vectors

2009-09-01 Thread jonas garcia
1] [,2] [1,] "a" "b" But I was looking after the following result (using vec.names): cbind(a,b) a b [1,] 0 5 [2,] 1 6 [3,] 2 7 [4,] 3 8 [5,] 4 9 Thanks in advance Jonas [[alternative HTML version deleted]]

[R] vector fragment

2009-05-16 Thread jonas garcia
ere”) I want to obtain a different vector like this: c(“ra”, “so”, “op”) Thanks in advance for your help Jonas [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] Sweave: Howto write real TeX formula in plot

2009-05-12 Thread Jonas Stein
, ‘digest’, ‘cacheSweave’ are not available | 2: In install.packages("pgfSweave", , "http://www.rforge.net/";) : | installation of package 'pgfSweave' had non-zero exit status | ` what will i have to do now? And could someone give me an example how to write a formu

[R] howto find x value where x=max(x)

2009-05-08 Thread Jonas Stein
akFreqHz = subset(fp, AmpNorm == max(AmpNorm))$Frequenz[1] Is there something nicer? And is there an easy way to do the same on "predict()" Thank you and kind regards, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/

[R] how to calculace the Observational error of an variable (nls fit)

2009-05-08 Thread Jonas Stein
or a = 1.4e-05 with 98% confidence Thank you for reading so far and thank you for any help. -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/p

[R] problems understanding error term in aov()

2009-04-28 Thread Jonas Mandel
Could you please help me understanding which is the right model for my question ? Thanks by advance Jonas Mandel U900 - Bioinformatics unit Institut Curie Paris __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

[R] Sweave: Howto write real TeX formula in plot

2009-04-19 Thread Jonas Stein
font that is used in the TeX-document? Thank you for any help. -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] Biexponential Fit

2009-04-09 Thread Jonas Weickert
Thank you! Now it's working. Peter Dalgaard schrieb: Jonas Weickert wrote: Hi, I want to do a biexponential Fit, i.e. y ~ A1*exp(k1*x) + A2*exp(k2*x) Is this possible? I tried nls() but it stopped with several (different) errors. I'm using y and x as simple vectors and the formu

[R] Biexponential Fit

2009-04-09 Thread Jonas Weickert
Hi, I want to do a biexponential Fit, i.e. y ~ A1*exp(k1*x) + A2*exp(k2*x) Is this possible? I tried nls() but it stopped with several (different) errors. I'm using y and x as simple vectors and the formula for nls() exactly as mentioned above. Thanks a lot!

[R] How to rotate axis labels? 2009

2009-03-26 Thread Jonas Stein
have been some improvement... Does anyone know a nice and easy way to turn labels on the y axis in the same direction as the x labels? Thank you very much for reading and hints, -- Jonas Stein __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] missing argument

2008-12-11 Thread jonas garcia
; Behalf Of Tony Breyal > Sent: Wednesday, December 10, 2008 1:01 PM > To: r-help@r-project.org > Subject: Re: [R] missing argument > > ?missing > > never used it myself, but looks like it might help you :-) > > Tony Breyal. > > On 10 Dec, 19:09, "jonas garcia&q

[R] missing argument

2008-12-10 Thread jonas garcia
Dear list, I have a question and I'm going to give an example of my problem f<- function(d1, d2, d3) { d<- d1*d2/d3 return(d) } v1<- 1 v2<- 2 If I try f(v1, v2, v3) Error in f(v1, v2, v3) : object "v3" not found I obviously got the above error message. I would like to add something to my functio

Re: [R] extract bits of a character vector

2008-10-22 Thread jonas garcia
Thank you all for the useful responses. Problem solved! J On Thu, Oct 23, 2008 at 12:14 AM, Duncan Murdoch <[EMAIL PROTECTED]>wrote: > On 22/10/2008 5:02 PM, jonas garcia wrote: > >> Dear list: >> >> >> >> I have the following problem: From a vector

[R] extract bits of a character vector

2008-10-22 Thread jonas garcia
Dear list: I have the following problem: From a vector like this: vec<- c("mud_1999_area_A", "gravel_2004_area_F") I would like to get the year in a separate vector, such y<- c("1999", "2004") I´ve been looking to grep() but I'm not sure how to do this. Help? Thanks in advance J

Re: [R] access object inside a function

2008-08-03 Thread Jonas
#here i would like to access objects not returned by NelsonSiegel } //Jonas On Sun, Aug 3, 2008 at 6:05 PM, Patrick Burns <[EMAIL PROTECTED]> wrote: > Duncan Murdoch wrote: >> >> On 03/08/2008 11:29 AM, Jonas wrote: >>> >>> hi, >>> >>>

[R] access object inside a function

2008-08-03 Thread Jonas
unction.from.package(x,y) plot (object.inside.package.function) } i'm using R 2.7.1 on linux sincerely, jonas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/po

[R] Question about copula-GARCH model

2008-06-20 Thread Jonas Malmros
simple and totally obvious thing, but I just do not get it. :-( Could you please help me understand? How do I do it in MATLAB or R? THanks in advance! -- Jonas Malmros __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d

  1   2   >