Re: [R] How two compare two matrixes

2011-03-04 Thread Philipp Pagel
Dear all I have two 10*10 matrixes and I would like to compare theirs contents. By the word content I mean to check visually (not with any mathematical formulation) how similar are the contents. If they are really only 10x10 you can simply print them both to the screen and look at them. I'm

Re: [R] Floating points and floor() ?

2011-03-04 Thread Petr Savicky
On Thu, Mar 03, 2011 at 06:23:36PM -0800, Folkes, Michael wrote: Perhaps somebody could clarify for me if the following is a floating point matter or otherwise, and how am I to correct for it? floor(100*.1) [1] 10 100*(1.0-.9) [1] 10 floor(100*(1-0.9)) [1] 9 As others pointed

[R] lattice: wireframe eats up points; how to make points on wireframe visible?

2011-03-04 Thread Marius Hofert
Dear expeRts, I would like to add two points to a wireframe plot. The points have (x,y,z) coordinates where z is determined to be on the wireframe [same z-value]. Now something strange happens. One point is perfectly plotted, the other isn't shown at all. It only appears if I move it upwards

Re: [R] lattice: How to increase space between ticks and labels of z-axis?

2011-03-04 Thread Marius Hofert
Dear Peter, nice approach! Of course it's a bit tedious because you have to specify where the ticks are drawn yourself. But it solves the problem. Thanks! Marius On 2011-03-04, at 01:32 , P Ehlers wrote: Marius Hofert wrote: Dear expeRts, How can I increase the space between the ticks

Re: [R] questions about using loop, while and next

2011-03-04 Thread Berend Hasselman
Carrie Li wrote: ... In my loop, I have some random generation of data, but if the data doesn't meet some condition, then I want it to go next, and generate data again for next round. # just an example.. # i want to generate the data again, if the sum is smaller than 25 temp=rep(NA,

Re: [R] R usage survey

2011-03-04 Thread Harsh
The R usage survey goo.gl/jw1ig has been updated with the following changes: Addition of - Disclaimer : This data will not be used for any commercial purposes Do not include any personally identifiable information Contact: Harsh Singhal (singhalblr AT gmail DOT com) for any queries Removal of -

[R] cv.lm syntax error

2011-03-04 Thread agent dunham
Dear all, I've tried a multiple regression, and now I want to try a cross-validation. I obtain this error (it must be sth related to df) that I don't understand, any help would be appreciated. cv.lm(df= dat, lm2.52f, m=3) Error en `[.data.frame`(df, , ynam) : undefined columns selected

[R] How to copy data from data.frame to matrix

2011-03-04 Thread Dmitrij Kudriavcev
Hello I'm a new in R I have a large data.frame s (this is actualy just a table in mysql) : names(s) [1] symbols, day, value I need to convert it to simple matrix. I have define this matrix like this: data.matrix - matrix(nrow=nDays, ncol=nSymbols, dimnames=list(days, symbols)) then i just

[R] Question about Chi-squared test

2011-03-04 Thread Jeff Fang
Hi all, I know Chi-squared test can be done with the frequency data by R function chisq.test(), but I am not sure if it can be applied to the percentage data ? The example of my data is as follow: # KSL MHL MWS CLGC

[R] Zero Inflated Distributions

2011-03-04 Thread vioravis
I am currently fitting the following distributions using JMP and looking for ways to fit the same distributions in R: Zero Inflated Lognormal Zero Inflated Loglogistic Zero Inflated Frechet Zero Inflated Weibull Threshold Frechet Threshold Loglogistic Threshold Lognormal Log Generalized Gamma

Re: [R] parallel bootstrap linear model on multicore mac (re-post)

2011-03-04 Thread hiemstra
On 03/02/2011 11:38 PM, Anthony Dick wrote: Hello all, I am re-posting my previous question with a simpler, more transparent, commented code. I have been ramming my head against this problem, and I wondered if anyone could lend a hand. I want to make parallel a bootstrap of a linear mixed

[R] Help required for rpart package

2011-03-04 Thread Muralidharan Somasundaram
Hi, I am trying to model credit risk data using decision trees. Since the number of defaulters is less compared to non-defaulters (defaulters around 10%), we have the class imbalance problem. Consequently, the confusion matrix shows that the number of misclassified non-defaulters is large.

[R] scramble items

2011-03-04 Thread Matthew Finkbeiner
Hi, I am trying to scramble items in a matrix so that no item repeats on consecutive rows. This generates the matrix: LevelsOfA = 2 LevelsOfB = 2 LevelsOfC = 3 Items = 10 FactorA = rep(1:LevelsOfA, each=(LevelsOfB*LevelsOfC*Items)) FactorB = rep(rep(1:LevelsOfB,

Re: [R] How two compare two matrixes

2011-03-04 Thread Alaios
That's the problem Even a 10*10 matrix does not fit to the screen (10 columns do not fit in one screen's row) and thus I do not get a well aligned matrix printed. This is that makes comparisons not that easy to the eye. From the other hand with edit(mymatrix) I get scrolls so I can scroll to

Re: [R] vector(integer, length) : vector size specified is too large

2011-03-04 Thread Uwe Ligges
Please ask the author of parts() in the partitions package or the author of the function that calls the former: your function calls generate a call parts(J) where J is 1272. Internally, a J*P(J) (1272 * 1.514126e+19) vector is generated (and that one is too large for R). Uwe Ligges On

[R] overleap an iteration within a for-loop when error message produced

2011-03-04 Thread Nicolas Berkowitsch
Dear R-list member, I'm using the function pmnorm() (--library(mnormt)) within a for-loop. Certain parameter values leads to an error message: (In sqrt(diag(S)) : NaNs produced, In sqrt(1/diag(V)) : NaNs produced, In cov2cor(S) : diag(.) had 0 or NA entries; non-finite result is doubtful)

Re: [R] How two compare two matrixes

2011-03-04 Thread Uwe Ligges
On 04.03.2011 08:42, Alaios wrote: Dear all I have two 10*10 matrixes and I would like to compare theirs contents. By the word content I mean to check visually (not with any mathematical formulation) how similar are the contents. I also know edit that prints my matrix in the scree but still

Re: [R] How two compare two matrixes

2011-03-04 Thread Philipp Pagel
On Fri, Mar 04, 2011 at 01:49:29AM -0800, Alaios wrote: That's the problem Even a 10*10 matrix does not fit to the screen (10 columns do not fit in one screen's row) and thus I do not get a well aligned matrix printed. This is that makes comparisons not that easy to the eye. From the

[R] Generic mixup?

2011-03-04 Thread Nick Sabbe
Hello list. This is from an R session (admittedly, I'm still using R 2.11.1): print function (x, ...) UseMethod(print) environment: namespace:base showMethods(print) Function print: not a generic function Don't the two results contradict each other? Or do I have a terrible

Re: [R] overleap an iteration within a for-loop when error message produced

2011-03-04 Thread Philipp Pagel
Assume that the 5th iteration (subject=5) leads to the error message. How can I tell R to continue with the 6th iteration? try or tryCatch are probably what you want. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München

[R] Cannot find JRI native library

2011-03-04 Thread wesley mathew
Dear All. I was trying to connect java and R using jri but i have received some errors. Operating system - windows7, Java version = java 1.6.0_23, R version = R 2.12.1. JAVA_HOME and R_HOME variables are set in user variables and system variables. I have also added JRI .jar path in the system

Re: [R] How to copy data from data.frame to matrix

2011-03-04 Thread Ivan Calandra
Hi, Let's say your data.frame is called df: df - data.frame(a=rnorm(10), b=rnorm(10)) data.matrix - as.matrix(df) This should work, but be careful with coercion if you have different modes in your data.frame HTH, Ivan PS: next time, provide a reproducible example, using dput() for example

Re: [R] Zero Inflated Distributions

2011-03-04 Thread ONKELINX, Thierry
library(sos) findFn(Zero Inflated Lognormal) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek team Biometrie Kwaliteitszorg Gaverstraat 4 9500 Geraardsbergen Belgium Research Institute for Nature and Forest

[R] Anyone know a forum for stats advice?

2011-03-04 Thread Clare Embling
Hi, I know this forum is for R-related issues, but the question I have is a statistical question I was wondering if anyone could recommend a good statistics forum where I can ask the question? My question is relating to bootstrapping of binary data (ecology data) - I can give more detail,

Re: [R] Anyone know a forum for stats advice?

2011-03-04 Thread Stephan Kolassa
Hi Clare, you want to go here: http://stats.stackexchange.com/questions HTH Stephan Am 04.03.2011 12:08, schrieb Clare Embling: Hi, I know this forum is for R-related issues, but the question I have is a statistical question I was wondering if anyone could recommend a good statistics

Re: [R] overleap an iteration within a for-loop when error message produced

2011-03-04 Thread Nicolas Berkowitsch
Dear Nick, Dear Philipp, Thanks for quick responses - it worked! Below the implemented solution - in case others are interested: ## This will lead to an error message library (mnormt) p = matrix(NA,9,1) for (subject in 2:10) { p[subject]=pmnorm(x = subject*c(-.3,1), varcov =

Re: [R] Anyone know a forum for stats advice?

2011-03-04 Thread Rainer M Krug
r-sig-ecology (https://stat.ethz.ch/mailman/listinfo/r-sig-ecology) is also a good source when the stats is related to R, they are usually quite open. Rainer On Fri, Mar 4, 2011 at 12:08 PM, Clare Embling clare.embl...@plymouth.ac.uk wrote: Hi, I know this forum is for R-related issues, but

Re: [R] How two compare two matrixes

2011-03-04 Thread Mike Marchywka
?image ?matrix z-matrix(rnorm(100),nrow=10) image(1:10,1:10,z) heatmap(z) Date: Fri, 4 Mar 2011 09:04:41 +0100 From: p.pa...@wzw.tum.de To: r-help@r-project.org Subject: Re: [R] How two compare two matrixes Dear all I have two 10*10

[R] sum of digits or how to slice a number into its digits

2011-03-04 Thread drflxms
Dear R colleagues, I face a seemingly simple problem I couldn't find a solution for myself so far: I have to sum the digits of numbers. Example: 1010 -2 100100110 - 4 Unfortunately there seems not to be a function for this task. So my idea was to use sum(x) for it. But I did not figure out how

Re: [R] Generic mixup?

2011-03-04 Thread Ista Zahn
Hi Nick, I think showMethods is for s4 classes (which I know nothing about). I think you want methods(print) Best, Ista On Fri, Mar 4, 2011 at 10:14 AM, Nick Sabbe nick.sa...@ugent.be wrote: Hello list. This is from an R session (admittedly, I'm still using R 2.11.1): print function

Re: [R] sum of digits or how to slice a number into its digits

2011-03-04 Thread Dimitris Rizopoulos
one way is using function strsplit(), e.g., x - c(100100110, 1001001, 1101, 00101) sapply(strsplit(x, ), function (x) sum(x == 1)) I hope it helps. Best, Dimitris On 3/4/2011 2:18 PM, drflxms wrote: Dear R colleagues, I face a seemingly simple problem I couldn't find a solution for myself

Re: [R] sum of digits or how to slice a number into its digits

2011-03-04 Thread Ivan Calandra
Hi, Here is the best I've found: x - 100100110 sum(as.numeric(unlist(strsplit(as.character(x), split= It first converts x to character, then splits every character, unlist()s the results, then reconverts to numeric and sums it. HTH, Ivan Le 3/4/2011 14:18, drflxms a écrit : Dear R

[R] Coefficient of Determination for nonlinear function

2011-03-04 Thread Uwe Wolfram
Dear Subscribers, I did fit an equation of the form 1 = f(x1,x2,x3) using a minimization scheme. Now I want to compute the coefficient of determination. Normally I would compute it as r_square = 1- sserr/sstot with sserr = sum_i (y_i - f_i) and sstot = sum_i (y_i - mean(y)) sserr is clear to me

Re: [R] sum of digits or how to slice a number into its digits

2011-03-04 Thread drflxms
Hi Dimitris, thank you very much for your quick an efficient help! Your solution is perfect for me. Does exactly what I was looking for if combined with unlist and as.numeric before using sum. Now I can keep on with my real problem ;)... Thanx Again!!! Best, Felix Am 04.03.2011 14:25, schrieb

[R] Problem w/ function

2011-03-04 Thread Bengt Walerud
Hello Have a problem with a function I'm trying to implement in order to calculate weighted means on semi-aggregated data since tapply doesn't work. I've found a good solution to this using the following syntax: splitted.value-with(dataframe,split(value_var,group_var))

Re: [R] How to copy data from data.frame to matrix

2011-03-04 Thread Alberto Negron
Can't you just convert you df as follow matrix - as.matrix(s) ? Double check it as I am a newbie too. :-) Regards, Alberto On 4 March 2011 06:08, Dmitrij Kudriavcev dimitrij.kudriav...@ntsg.ltwrote: Hello I'm a new in R I have a large data.frame s (this is actualy just a table in mysql)

Re: [R] Error in model.frame.default

2011-03-04 Thread Heike Schmitz
Hi again, dear Dennis, i checked the spelling in Zuur et al. and they wrote it like i did. I tried your suggestion but now i have another warning message: D1- data.frame(L.AREA= Loyn$L.AREA[Loyn$fGRAZE==1], fGraze = 1) Error in data.frame(L.AREA = Loyn$L.AREA[Loyn$fGRAZE == 1], fGraze = 1) :

Re: [R] How to copy data from data.frame to matrix

2011-03-04 Thread Dmitrij Kudriavcev
Hello Let's say, my data.frame is symbol,day,value A, 2010-01-01, 0. A, 2010-01-02, 0. B, 2010-01-01, 0. i need to get matrix as , A, B 2010-01-01, 0., 0. 2010-01-02, 0., NA where A and B is columns name and date used as row name I found a way how to do it with tapply

[R] Time series analysis for a daily series

2011-03-04 Thread Paco Pastor
Hi everyone I am trying to do some time series analysis with daily temperature data (40 years). I have created a zoo object and ts object but can't apply stl function. It says the series is not periodic or has less than two periods. I've searched through google and found a lot of messages

Re: [R] message: please select CRAN mirror

2011-03-04 Thread Aggita
str(getCRANmirrors(all=FALSE,local.only=FALSE)) gives -- chr(0) -- View this message in context: http://r.789695.n4.nabble.com/message-please-select-CRAN-mirror-tp3331711p3334943.html Sent from the R help mailing list archive at Nabble.com. __

[R] column removing under certain conditions

2011-03-04 Thread Scheuringer Martin
Dear collegues! Given a matrix, I would like to remove columns, that do not fulfill a certain condition. The condition is, that the median of the column is higher than a certain value. I've seen the help on removing NA columns, but I cannot figure out how to change the function part of the

Re: [R] Zero Inflated Distributions

2011-03-04 Thread vioravis
Thanks, Thierry. Has anyone used the bayescount for estimating zero inflated distributions? It states that it is a crude function. Does that mean the estimates are only approximate??? The example they have given seems to work only with Gamma Poisson. data - rpois(100, rgamma(100, shape=1,

Re: [R] Generic mixup?

2011-03-04 Thread Francisco Gochez
Hi Nick, There is a difference between the newer S4 generic functions/methods and S3 generic functions. See for example: methods(print) showMethods(show) ?Methods HTH, -Francisco On Fri, Mar 4, 2011 at 10:14 AM, Nick Sabbe nick.sa...@ugent.be wrote: Hello list. This is from an R

Re: [R] How to copy data from data.frame to matrix

2011-03-04 Thread Dmitrij Kudriavcev
Hello, no. I need to change data format, so i can build covariance matrix on it Cheers, Dima 2011/3/4 Alberto Negron albertoneg...@gmail.com Can't you just convert you df as follow matrix - as.matrix(s) ? Double check it as I am a newbie too. :-) Regards, Alberto On 4 March 2011

Re: [R] tricky (for me) merging of data...more clarity

2011-03-04 Thread Grant Gillis
For our animals we are comfortable with saying that body condition represents a roughly 30 day period, plus and minus 15 days from measurement. However, we have monitored individuals for longer periods and during those periods we do not wish there to be any values for body condition. There are

[R] Rstudio question

2011-03-04 Thread Robert Kinley
I really like RStudio ... ... but I wish it wouldn't automatically reload the last .RData it had. Anyone know how to fix this ... ? Also - does anyone know is there an Rstudio-user email-list forum thingy out there ? ta. Robert Kinley [[alternative HTML version

[R] Multi-line input to rsympy

2011-03-04 Thread Joanna Lewis
Dear R users, I have been using rsympy to solve a set of simultaneous equations from R. There are two solutions for the variable I'm interested in, xx[0] and xx[1], which are in terms of symbols called lam and conc. I'd like to pick out the one which is positive at (lam=0, conc=0) and call it

[R] Creating a .png with just an expression() in it

2011-03-04 Thread Alexx Hardt
Hey, I'm trying to create an image file with the results of a regression analysis. In TeX, the line would be something like: $ size = 0.34 + 4.3 var_1 $ Can I create a plot window with just this line in it? I tried playing around with plot.new() or dev.new(), but didn't really find something

Re: [R] Rstudio question

2011-03-04 Thread Shige Song
Why don't you post the question to the RStudio support forum? The folks there are quite responsive and very helpful. Shige On Fri, Mar 4, 2011 at 9:05 AM, Robert Kinley kinley_rob...@lilly.com wrote:  I really like RStudio ... ... but I wish it wouldn't automatically reload the last .RData it

[R] Coefficient of Determination for nonlinear function

2011-03-04 Thread Uwe Wolfram
Dear Subscribers, I did fit an equation of the form 1 = f(x1,x2,x3) using a minimization scheme. Now I want to compute the coefficient of determination. Normally I would compute it as r_square = 1- sserr/sstot with sserr = sum_i (y_i - f_i) and sstot = sum_i (y_i - mean(y)) sserr is clear to me

[R] delete rows whose sum is X

2011-03-04 Thread purna
Rnoob here. I have a matrix of zeroes ond ones. I want to delete the rows whose sum of values is not =5, alternatively extract the rows who sum up to 5. Thank you/Mikael -- View this message in context: http://r.789695.n4.nabble.com/delete-rows-whose-sum-is-X-tp3335254p3335254.html Sent from

[R] linear model - lm (Adjusted R-squared)?

2011-03-04 Thread Brian Smith
Hi, Sorry for the naive question, but what exactly does the 'Adjusted R-squared' coefficient in the summary of linear model adjust for? Sample code: x - rnorm(15) y - rnorm(15) lmr - lm(y~x) summary(lmr) Call: lm(formula = y ~ x) Residuals: Min 1Q Median 3Q Max -1.7828

[R] Question in Chi-squared test, can I do it with percentage data?

2011-03-04 Thread Jeff Fang
Hi all, I know Chi-squared test can be done with the frequency data by R function chisq.test(), but I am not sure if it can be applied to the percentage data ? The example of my data is as follow: # KSL MHL MWS CLGC

[R] Environment variable PATH in Windows

2011-03-04 Thread Dennis Fisher
Colleagues, I am trying to understand how R (2.12.1) obtains the PATH environment variable in Windows (7 or Vista). Startup {base} directs one to: R_ENVIRON -- which equals in my systems R_HOME/etc/Renviron.site -- which does not exist Next, it directs to:

Re: [R] Rstudio question

2011-03-04 Thread Abhijit Dasgupta
Seconded. Go to the support forum at www.rstudio.org and post your question/bug/suggestion. Those folks have been excellent in their response times and feedback. On 3/4/2011 9:14 AM, Shige Song wrote: Why don't you post the question to the RStudio support forum? The folks there are quite

Re: [R] Question about Chi-squared test

2011-03-04 Thread David Winsemius
On Mar 4, 2011, at 1:24 AM, Jeff Fang wrote: Hi all, I know Chi-squared test can be done with the frequency data by R function chisq.test(), but I am not sure if it can be applied to the percentage data ? The example of my data is as follow: #

Re: [R] delete rows whose sum is X

2011-03-04 Thread Sarah Goslee
On Fri, Mar 4, 2011 at 8:50 AM, purna mij...@live.se wrote: Rnoob here. I have a matrix of zeroes ond ones. I want to delete the rows whose sum of values is not =5, alternatively extract the rows who sum up to 5. Thank you/Mikael I think you would greatly benefit from reading some of the

Re: [R] column removing under certain conditions

2011-03-04 Thread Ivan Calandra
Dear Martin, I'm not sure I understood you well, because you basically have the answer already... What about this? A[,apply(A, 2, function(x) median(x)0), drop=FALSE] (drop=FALSE ensures that you keep it as column even if only one column is selected) HTH, Ivan Le 3/4/2011 11:11,

Re: [R] Plotting Mean in plotting degree distribution

2011-03-04 Thread Gábor Csárdi
I think this would be rather something like abline(v=mean(degree(G))) Best, Gabor On Thu, Mar 3, 2011 at 8:04 PM, Scott Chamberlain scttchamberla...@gmail.com wrote: library(igraph) G - erdos.renyi.game(1000, 1/1000) # a random graph dd1 = degree.distribution(G) plot(dd1, xlab = degree,

Re: [R] delete rows whose sum is X

2011-03-04 Thread Ivan Calandra
Hi Mikael You really need to provide a reproducible example in the future, it will help people to better understand what you want to do and help you, and help you better understand the answers as well. Try something like this: mat[apply(mat, 1, FUN=function(x) sum(x)=5),] HTH, Ivan Le

Re: [R] How to copy data from data.frame to matrix

2011-03-04 Thread Ivan Calandra
I have never used it, but I think the reshape and/or reshape2 packages are designed for it. Check the melt() and cast() functions in these packages... I guess... Ivan Le 3/4/2011 11:33, Dmitrij Kudriavcev a écrit : Hello, no. I need to change data format, so i can build covariance matrix on

Re: [R] delete rows whose sum is X

2011-03-04 Thread Ivan Calandra
Oops, forgot one =: mat[apply(mat, 1, FUN=function(x) sum(x)==5),] Le 3/4/2011 15:36, Ivan Calandra a écrit : Hi Mikael You really need to provide a reproducible example in the future, it will help people to better understand what you want to do and help you, and help you better understand

Re: [R] Environment variable PATH in Windows

2011-03-04 Thread Uwe Ligges
On 04.03.2011 15:16, Dennis Fisher wrote: Colleagues, I am trying to understand how R (2.12.1) obtains the PATH environment variable in Windows (7 or Vista). Startup {base} directs one to: R_ENVIRON -- which equals in my systems R_HOME/etc/Renviron.site -- which does not

Re: [R] Error in model.frame.default

2011-03-04 Thread David Winsemius
On Mar 4, 2011, at 4:47 AM, Heike Schmitz wrote: Hi again, dear Dennis, i checked the spelling in Zuur et al. and they wrote it like i did. I tried your suggestion but now i have another warning message: D1- data.frame(L.AREA= Loyn$L.AREA[Loyn$fGRAZE==1], fGraze = 1) Error in

Re: [R] How to copy data from data.frame to matrix

2011-03-04 Thread Uwe Ligges
On 04.03.2011 11:38, Dmitrij Kudriavcev wrote: Hello Let's say, my data.frame is symbol,day,value A, 2010-01-01, 0. A, 2010-01-02, 0. B, 2010-01-01, 0. i need to get matrix as See ?reshape, in this case if you data.frame is in dat: reshape(dat, v.names=value,

Re: [R] delete rows whose sum is X

2011-03-04 Thread Uwe Ligges
On 04.03.2011 15:41, Ivan Calandra wrote: Oops, forgot one =: mat[apply(mat, 1, FUN=function(x) sum(x)==5),] Yes, but since floating point issues may ba apparent in the end, I'd vote for: mat[apply(mat, 1, FUN = function(x) isTRUE(all.equal(sum(x), 5))),] Le 3/4/2011 15:36, Ivan

Re: [R] delete rows whose sum is X

2011-03-04 Thread Ivan Calandra
True, I didn't think about it because the matrix is supposed to be filled with 0 and 1, and I automatically thought about integers. It wouldn't be a problem with integers, right? Le 3/4/2011 15:47, Uwe Ligges a écrit : On 04.03.2011 15:41, Ivan Calandra wrote: Oops, forgot one =:

Re: [R] delete rows whose sum is X

2011-03-04 Thread Uwe Ligges
On 04.03.2011 15:52, Ivan Calandra wrote: True, I didn't think about it because the matrix is supposed to be filled with 0 and 1, and I automatically thought about integers. It wouldn't be a problem with integers, right? If the matrix is really an integer matrix, right, otherwise not. Best,

Re: [R] Creating a .png with just an expression() in it

2011-03-04 Thread David Winsemius
On Mar 4, 2011, at 8:31 AM, Alexx Hardt wrote: Hey, I'm trying to create an image file with the results of a regression analysis. In TeX, the line would be something like: $ size = 0.34 + 4.3 var_1 $ Can I create a plot window with just this line in it? I tried playing around with

Re: [R] Time series analysis for a daily series

2011-03-04 Thread Rainer M Krug
On Fri, Mar 4, 2011 at 12:33 PM, Paco Pastor p...@ceam.es wrote: Hi everyone I am trying to do some time series analysis with daily temperature data (40 years). I have created a zoo object and ts object but can't apply stl function. It says the series is not periodic or has less than two

Re: [R] Creating a .png with just an expression() in it

2011-03-04 Thread Uwe Ligges
On 04.03.2011 16:12, David Winsemius wrote: On Mar 4, 2011, at 8:31 AM, Alexx Hardt wrote: Hey, I'm trying to create an image file with the results of a regression analysis. In TeX, the line would be something like: $ size = 0.34 + 4.3 var_1 $ Can I create a plot window with just this line

Re: [R] Creating a .png with just an expression() in it

2011-03-04 Thread David Winsemius
On Mar 4, 2011, at 10:12 AM, David Winsemius wrote: On Mar 4, 2011, at 8:31 AM, Alexx Hardt wrote: Hey, I'm trying to create an image file with the results of a regression analysis. In TeX, the line would be something like: $ size = 0.34 + 4.3 var_1 $ Can I create a plot window with

[R] a simple problem

2011-03-04 Thread Asan Ramzan
Hello R-help   I am working with large data table that have the occasional label,  a particular time point in an experiment. E.g: Time (min), R1 R1, R2 R1, R3 R1, R4 R1 .909, 1.117, 1.225, 1.048, 1.258 3.942, 1.113, 1.230, 1.049, 1.262 3.976, 1.105, 1.226, 1.051, 1.259 4.009, 1.114, 1.231, 1.053,

[R] AIC on GLMM pscl package

2011-03-04 Thread Caribu
Hello, I'm using GLMM on the pscl package and i'm not getting the AIC on the summary. The code i'm using is (example) : mmall3 -glmmPQL(allclues ~ cycloc + male, data=dados, family=poisson, random=~1|animal/idfid) and the results: Linear mixed-effects model fit by maximum likelihood Data:

[R] apply.rolling() to a multi column timeSeries

2011-03-04 Thread William Mok
Hello there, I am trying to compute the 3 months return momentum with the timeSeries x.ts, which is just a subset of simple returns from a much bigger series, class(x.ts) [1] timeSeries attr(,package) [1] timeSeries dim(x.ts) [1] 20 3 x.ts[1:8,] GMT MS.US AAPL.US

[R] Problem with tcltk

2011-03-04 Thread Arnaud Mosnier
Dear all, Since I installed the x64 version of R (v2.12.1), I got a problem with tcltk that I did not achieve to resolve. When loading the library, it gives me the following error message: Loading Tcl/Tk interface ...Error : .onLoad failed in loadNamespace() for 'tcltk', details: call: inDL(x,

Re: [R] a simple problem

2011-03-04 Thread David Winsemius
On Mar 4, 2011, at 9:50 AM, Asan Ramzan wrote: Hello R-help I am working with large data table that have the occasional label, a particular time point in an experiment. E.g: Time (min), R1 R1, R2 R1, R3 R1, R4 R1 .909, 1.117, 1.225, 1.048, 1.258 3.942, 1.113, 1.230, 1.049, 1.262 3.976,

Re: [R] linear model - lm (Adjusted R-squared)?

2011-03-04 Thread Erik Iverson
See: http://en.wikipedia.org/wiki/Coefficient_of_determination#Adjusted_R2 and the implementation in summary.lm : ans$adj.r.squared - 1 - (1 - ans$r.squared) * ((n - df.int)/rdf) Brian Smith wrote: Hi, Sorry for the naive question, but what exactly does the 'Adjusted

Re: [R] Coefficient of Determination for nonlinear function

2011-03-04 Thread Bert Gunter
The coefficient of determination, R^2, is a measure of how well your model fits versus a NULL model, which is that the data are constant. In nonlinear models, as opposed to linear models, such a null model rarely makes sense. Therefore the coefficient of determination is generally not meaningful

[R] Reading in and manipulating multiple data sets from the same input file

2011-03-04 Thread mattnixon
Hi, I am attempting to write code which will read in my data which is of this form: X1Y1X2 Y2 XnYn 0 0 0 00 0 1 0 1 255 1 0 2 255

Re: [R] questions about using loop, while and next

2011-03-04 Thread rex.dwyer
Carrie, If your while-loop condition depends only on dt, and you don't change dt in your loop, your loop won't terminate. The only thing inside your loop is next. Perhaps you mean to write: temp=rep(NA, 10) for(i in 1:10) { dt=sum(rbinom(10, 5, 0.5)) while (dt25) { dt=sum(rbinom(10, 5, 0.5)) }

[R] make an own (different) color legend with spplot()

2011-03-04 Thread Marcel J.
Hi! Is there a way to manually costumize the color legend in an spplot() - especially where to draw ticks and labels for the ticks? The reason I'm asking: Usually spplot() automatically divides the data into fitting slices and makes a color legend (also automatically). I want to assign the

[R] make an own (different) color legend with spplot()

2011-03-04 Thread Marcel J.
Hi! Is there a way to manually costumize the color legend in an spplot() - especially where to draw ticks and labels for the ticks? The reason I'm asking: Usually spplot() automatically divides the data into fitting slices and makes a color legend (also automatically). I want to assign the

Re: [R] Coefficient of Determination for nonlinear function

2011-03-04 Thread Liaw, Andy
As far as I can tell, Uwe is not even fitting a model, but instead just solving a nonlinear equation, so I don't know why he wants a R^2. I don't see a statistical model here, so I don't know why one would want a statistical measure. Andy -Original Message- From:

Re: [R] Reading in and manipulating multiple data sets from the same input file

2011-03-04 Thread Ista Zahn
Hi, I'm afraid it's not clear to me what you are trying to do. Can you clarify what result you are trying to achieve? Best, Ista On Fri, Mar 4, 2011 at 11:18 AM, mattnixon m.r.ni...@ex.ac.uk wrote: Hi, I am attempting to write code which will read in my data which is of this form: X1      

Re: [R] R usage survey

2011-03-04 Thread rex.dwyer
You still don't say what organization you are associated with. Your domain name and e-mail address give no hint. How do we know that Harsh Singhal is even a real person? An e-mail address at a university (for example) would go a long way to establish that. Gmail doesn't cut it for me. The

Re: [R] Generic mixup?

2011-03-04 Thread Uwe Ligges
On 04.03.2011 11:14, Nick Sabbe wrote: Hello list. This is from an R session (admittedly, I'm still using R 2.11.1): print function (x, ...) UseMethod(print) environment: namespace:base showMethods(print) Function print: not a generic function Don't the two results

[R] r.dll

2011-03-04 Thread wesley mathew
Dear all I have some problem to execute jri package. R.dll file has to copped to jri directory for the execution of jar file in eclips. But R.dll file is not available in the R version 2.12.1 . Is there any chance to get this file. Thanks in advanced Kind regards W. Mathew

Re: [R] r.dll

2011-03-04 Thread Uwe Ligges
On 04.03.2011 18:15, wesley mathew wrote: Dear all I have some problem to execute jri package. R.dll file has to copped to jri directory for the execution of jar file in eclips. But R.dll file is not available in the R version 2.12.1 . It is, at least in the Windows binary distribution. Uwe

Re: [R] Coefficient of Determination for nonlinear function

2011-03-04 Thread Bert Gunter
Andy, You may well be right. I assumed fitting an equation means that he had data to which the equation was being fitted. Maybe that's wrong -- re-reading the post still does not clarify the point for me. In any case, either way, fitting R^2 makes no sense. -- Bert On Fri, Mar 4, 2011 at 8:44

Re: [R] cv.lm syntax error

2011-03-04 Thread Uwe Ligges
On 04.03.2011 10:11, agent dunham wrote: Dear all, I've tried a multiple regression, and now I want to try a cross-validation. I obtain this error (it must be sth related to df) that I don't understand, any help would be appreciated. cv.lm(df= dat, lm2.52f, m=3) Error en `[.data.frame`(df,

[R] S. function calculating x +- y

2011-03-04 Thread Sascha Vieweg
Hello, I am looking for an elegant one-liner for the following operation: x - rnorm(10) y - runif(10) c(mean(x)-mean(y), mean(x)+mean(y)) I thought about apply(data.frame(x, y), 2, mean) but I don't know how to apply the +- operation on the result of apply. Thanks, *S* -- Sascha Vieweg,

[R] retrieve x y coordinates of points in current plot

2011-03-04 Thread Jannis
Dear list, is it somehow possible to retrieve the x and y coordinates of points in a scatterplot after it has been plotted? identify() somehow seems to manage this, so I was wondering whether it is possible? I am asking as I wrote a function that identifies points inside a polygon and I

Re: [R] S. function calculating x +- y

2011-03-04 Thread Uwe Ligges
On 04.03.2011 18:22, Sascha Vieweg wrote: Hello, I am looking for an elegant one-liner for the following operation: x - rnorm(10) y - runif(10) c(mean(x)-mean(y), mean(x)+mean(y)) I thought about apply(data.frame(x, y), 2, mean) but I don't know how to apply the +- operation on the result

Re: [R] PCA - scores

2011-03-04 Thread William Revelle
At 9:52 AM -0700 3/4/11, Shari Clare wrote: Hi Bill and Josh: When I run any principal code with scores=TRUE, I get the following Error: Error in principal (my.data,3,scores=TRUE) : unused argument (scores=TRUE) Thoughts? What version of psych are you using? Does it work on the example I

Re: [R] How two compare two matrixes

2011-03-04 Thread P Ehlers
Alaios wrote: That's the problem Even a 10*10 matrix does not fit to the screen (10 columns do not fit in one screen's row) and thus I do not get a well aligned matrix printed. I don't see why you would want to do this, but you could always invoke two instances of R and create one matrix in

Re: [R] S. function calculating x +- y

2011-03-04 Thread Gabor Grothendieck
On Fri, Mar 4, 2011 at 12:22 PM, Sascha Vieweg saschav...@gmail.com wrote: Hello, I am looking for an elegant one-liner for the following operation: x - rnorm(10) y - runif(10) c(mean(x)-mean(y), mean(x)+mean(y)) I thought about apply(data.frame(x, y), 2, mean) but I don't know how to

Re: [R] S. function calculating x +- y

2011-03-04 Thread Joshua Wiley
Hi Sascha, As Uwe said, I am not sure you will get more elegant. If you want it to be simple because you do it a lot and the typing is a burden, consider writing a function. Here is a little example: ## f - function(x, y, ...) { mx - mean(x, ...) my - mean(y, ...) * c(-1, 1) mx

Re: [R] retrieve x y coordinates of points in current plot

2011-03-04 Thread Dieter Menne
jannis-2 wrote: is it somehow possible to retrieve the x and y coordinates of points in a scatterplot after it has been plotted? identify() somehow seems to manage this, so I was wondering whether it is possible? locator might be the more basic function you are looking for. Dieter

Re: [R] Reading in and manipulating multiple data sets from the same input file

2011-03-04 Thread Richard M. Heiberger
The message Error in profile$Y : object of type 'closure' is not subsettable means R thinks you are attempting to subset the function profile. Pick a different name for your variable to avoid the name clash. On Fri, Mar 4, 2011 at 11:18 AM, mattnixon m.r.ni...@ex.ac.uk wrote: Hi, I am

  1   2   >