Re: [R] indexing in a function doesn't work?

2012-04-02 Thread Benjamin Caldwell
Petr, You can get an example dataset at http://dl.dropbox.com/u/3845242/torhelp.csv. I'll look at the rest of your suggestions in the morning, thanks for taking a look at it. Ben * * On Mon, Apr 2, 2012 at 10:33 PM, Petr PIKAL wrote: > Hi > > There is some mismatch in curly braces in your plo

Re: [R] indexing in a function doesn't work?

2012-04-02 Thread Petr PIKAL
Hi There is some mismatch in curly braces in your plotter function but when I try to use it I get > plotter(10,3,fram=rwb,framvec=rwb$prcnt.char.depth,obj=prcnt.char.depth,form1= + post.f.crwn.length~shigo.av,form2=post.f.crwn.length~shigo.av-1, + form3=leaf.area~(1/exp(shigo.av*x))*n,type=2,xl

[R] A trivial plot gives open circles as the plot char but another one gives me "q"s . . why is this?

2012-04-02 Thread Philip Rhoades
People, On my home computer with a real plot I get what I expect - open circles as the plot character - on my work computer I get "q"s ! So I tried a trivial test plot on the work computer ie: a <- c(1,2,3,4,5) b <- c(1,2,3,4,5) plot(a,b) and that also gives me open circles as it should!

[R] how to use condition indexes to test multi-collinearity

2012-04-02 Thread frank.chiang
Dear Users, I try to calculate condition indexes and variance decomposition proportions in order to test for collinearity using colldiag() in perturb package, I got a large index and two variables with large variance decomposition proportions,but one of them is constant item.I also checked the V

Re: [R] pairwise linear regression between two large datasets

2012-04-02 Thread stathisan
actually i figured it out: regRes[dim(regRes)[1]] should be regRes[dim(regRes)[1], ] -- View this message in context: http://r.789695.n4.nabble.com/pairwise-linear-regression-between-two-large-datasets-tp4527476p4527680.html Sent from the R help mailing list archive at Nabble.com.

[R] Compare by row and insert previous row value (Or non Time Series Lag)

2012-04-02 Thread Krishnan Viswanathan
I have the following sample dataset (CSV input here:http://goo.gl/YR8LP. CSV output here: http://goo.gl/EFCC8) which I want to transform as follows. For each person in a household I want to create two new variables OrigTAZ and DestTAZ. It should take the value in TripendTAZ and put that in DestTAZ.

Re: [R] pairwise linear regression between two large datasets

2012-04-02 Thread jdnewmil
If "any idea of a for loop is disastrous," why are you using apply, which is basically a for loop? I think you have framed the question in such a way that loops are inevitable. You are already using the LHS as a matrix, which is the main speedup I could think of. However, you can avoid some s

Re: [R] Finding Instances of a Pattern Throughout Data Set

2012-04-02 Thread R. Michael Weylandt
As a purely R question though, the OP's suggested code is rather efficient, though I wouldn't be surprised if a hair more efficiency couldn't be achieved by pre-allocating the sensorReadings[,2] instead of calling it twice. Probably a speed/memory trade-off at that point. If he has enough data tha

Re: [R] Finding Instances of a Pattern Throughout Data Set

2012-04-02 Thread Hasan Diwan
Mr Gunter, On 2 April 2012 21:15, Bert Gunter wrote: > I strongly suggest you consult with a local statistician. Your > description is far too vague (to me anyway) to make any sense of and > probably requires a good deal of back and forth between you and a > competent data analyst to pin down wha

Re: [R] Finding Instances of a Pattern Throughout Data Set

2012-04-02 Thread Bert Gunter
I strongly suggest you consult with a local statistician. Your description is far too vague (to me anyway) to make any sense of and probably requires a good deal of back and forth between you and a competent data analyst to pin down what the issues and constraints are. For example, what constitutes

[R] Finding Instances of a Pattern Throughout Data Set

2012-04-02 Thread Hasan Diwan
I have approximately 2.5 million rows from a number of sensor readings. Having plotted these, I can see a given pattern (say a spike in the amplitude away from the mean). I would now like to automate this procedure as we're expecting a great deal more data in the near future. Is there any package o

Re: [R] fatal error prevents multi-line functions or loop to run

2012-04-02 Thread Jeff Newmiller
Since you want to progress to further statements within test(), you need to wrap the summary function call in the try, not the whole test() function: try( summary(w), silent =TRUE ) --- Jeff NewmillerT

Re: [R] fatal error prevents multi-line functions or loop to run

2012-04-02 Thread Ebrahim Jahanshiri
Thanks jeff, You are right about my expectation so if you have time please take a look at this: library(spdep) test <- function () { #read neighborhood list neigh.gal <- read.gal(" http://sites.google.com/site/geosciej/Home/ter1RIorigM_T1.GAL?revision=1";) #Making a weight matrix (listW) w

[R] pairwise linear regression between two large datasets

2012-04-02 Thread Stathis Metsovitis
Hi all, I am trying to perform some analysis on the residuals of pair-wise linear regressions between two large sets A with dimensions {k x m}, and B {k x n} . So I need to regress every column B[,j] of B on every column A[,i] of A and produce a matrix C with dimensions {m x n}, so that C[i,j] cont

Re: [R] Problem loading package 'JGR' using R-2.15.0 (Win32).

2012-04-02 Thread Robert Baer
On a 32-bit windows 7 machine running R 2.15.0 standard binary install, JGR loaded fine as seen below: library(JGR) Loading required package: rJava Loading required package: JavaGD Loading required package: iplots Please type JGR() to download/launch console. Launchers can also be obtained at

Re: [R] Calculating NOEL using R and logistic regression - Toxicology

2012-04-02 Thread vito.muggeo
dear Danielle, The NOEL is a threshold value or breakpoint in the range of dose. Have a look to the package segmented to estimate a GLM with unknown breakpoints. The code (untested) should be something like library(segmented) o<-glm(y~1, family=binomial) os<-segmented(o, ~dose, psi=starting_psi

[R] Calculating NOEL using R and logistic regression - Toxicology

2012-04-02 Thread Danielle Duncan
Hello, I used the glm function in R to fit a dose-response relationship and then have been using dose.p to calculate the LC50, however I would like to calculate the NOEL (no observed effect level), ie the lowest dose above which responses start occurring. Does anyone know how to do this? [

Re: [R] How to layout the output nicely into webpage?

2012-04-02 Thread Michael
Also, is there a way to add a plot onto each trunk, so it will become 3 parts: Left: data (xtrunk: 40 rows) Mid: plot of this data Right: lm summary outputs (around 10 rows) Any thoughts? Thanks a lot! On Mon, Apr 2, 2012 at 5:30 PM, Michael wrote: > How to layout the output nicely into webpa

Re: [R] Default parameter values in R functions?

2012-04-02 Thread Marc Schwartz
Just to point out another reference, which is the R Language Definition, where in section 4.3.2: http://cran.r-project.org/doc/manuals/R-lang.html#Argument-matching entitled "Argument Matching", there are some pointers to the use of match.arg(), leading you to the help page pointed to by Bert

[R] How to layout the output nicely into webpage?

2012-04-02 Thread Michael
How to layout the output nicely into webpage? Hi all, I have data which is about 6 x 1 divided into trunks and in the following for loop I am doing data analysis trunk by trunk. The goal is to layout the data and analysis summaries side-by-side in a clear manner. I guess the best way to pre

Re: [R] Default parameter values in R functions?

2012-04-02 Thread Michael
Okay! Thank you both for your help! So it chooses the 1st one by default... Thank you! On Mon, Apr 2, 2012 at 4:43 PM, Bert Gunter wrote: > Yes, it's a bit subtle. > > Argument matching is usually done through match.arg(), so see > ?match.arg > for an explanation.. > (the first chosen). > -- B

Re: [R] fatal error prevents multi-line functions or loop to run

2012-04-02 Thread Jeff Newmiller
Sounds like you tried everything I know. However, I, and anyone else on this list whose mind-reading powers are undeveloped, really can't be sure because you didn't show us what you tried. Perhaps you should (re-)read the posting guidelines and try showing us reproducible sample code that doesn'

Re: [R] Default parameter values in R functions?

2012-04-02 Thread Bert Gunter
Yes, it's a bit subtle. Argument matching is usually done through match.arg(), so see ?match.arg for an explanation.. (the first chosen). -- Bert On Mon, Apr 2, 2012 at 2:30 PM, Michael wrote: > Hi all, > > I have a newbie question: > > If I have a function with the following documentation: > >

Re: [R] Default parameter values in R functions?

2012-04-02 Thread R. Michael Weylandt
The first one -- this is implemented by match.arg(). Michael On Mon, Apr 2, 2012 at 5:30 PM, Michael wrote: > Hi all, > > I have a newbie question: > > If I have a function with the following documentation: > > > ca.jo(x, type = c("eigen", "trace"), ecdet = c("none", "const", "trend"), K = > 2,

[R] Default parameter values in R functions?

2012-04-02 Thread Michael
Hi all, I have a newbie question: If I have a function with the following documentation: ca.jo(x, type = c("eigen", "trace"), ecdet = c("none", "const", "trend"), K = 2, spec=c("longrun", "transitory"), season = NULL, dumvar = NULL) Let's take "type" as an example... if I omit this parameter w

Re: [R] Is it possible to de-select with sqlQuery from the RODBC library?

2012-04-02 Thread MacQueen, Don
I've never heard of a an SQL de-select, but if there is such a thing it shouldn't be too hard to find via some web searches. In the meantime, I would probably just do a select * to get all the fields from the database tables, and then drop the unwanted ones afterwards in R. I think this will give

Re: [R] Error in gamma(delta + (complex(0, 0, 1) * (x - mu))/alpha) : unimplemented complex function

2012-04-02 Thread Ben Bolker
Guaramy hotmail.com> writes: > [SNIP] > i think the problem is the gamma function, does anyone know how to compute > gamma with imaginary numbers? Try lngamma_complex() in the gsl package? Ben Bolker __ R-help@r-project.org mailing list https

Re: [R] nls() error

2012-04-02 Thread Jeff Breiwick
Thanks to Berend for his help with this. The problems seems to have been due to an environment that wasn't clean. I also gave x & y that were untransformed. But I am able to get results now. Jeff __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] sampling rows from a list

2012-04-02 Thread Justin Haynes
## recreating your data mydata<-list(matrix(1:9, nrow=3, byrow=T), matrix(10:15, nrow=2, byrow=T), matrix(16:30, nrow=5, byrow=T)) ## get the shortest matrix in your list n <- min(unlist(lapply(mydata, nrow))) ## subset the list into random samples of length n

Re: [R] sampling rows from a list

2012-04-02 Thread Bert Gunter
?? Something like: lapply(mydata, function(x){ nr <- nrow(x) x[sample(seq_len(nr),nr,rep=TRUE),] }) maybe. The idea is to use the sampled rows as your row index. -- Bert On Mon, Apr 2, 2012 at 11:24 AM, Bcampbell99 wrote: > Hi: > > I'm sure this seems like a rudimentary question, but I am n

[R] STL decomposition of time series with multiple seasonalities

2012-04-02 Thread Akinwale A (AT)
Hi all, I have a time series that contains double seasonal components (48 and 336) and I would like to decompose the series into the following time series components (trend, seasonal component 1, seasonal component 2 and irregular component). As far as I know, the STL procedure for decomposin

[R] sampling rows from a list

2012-04-02 Thread Bcampbell99
Hi: I'm sure this seems like a rudimentary question, but I am not well versed with R syntax for lists. I have a ragged array from which I've removed records (entire rows) with missing data. The functions I used to remove the missing cases resulted in the generation of an R list class object, tha

[R] How to hide console window

2012-04-02 Thread mrzung
Hi, all I'm wondering the code that hides or minimizes console window. What I'm making is gui for some function and that is saved as gui.RData that is started with gui window when I open the gui.RData. In this sitiuation I don't want to see console window but just gui window. How can I solve my pro

Re: [R] nls() error

2012-04-02 Thread Berend Hasselman
On 02-04-2012, at 21:20, Jeff Breiwick wrote: > Thanks for that. Sorry, I did forget to give some basics: > You should also reply to the list so that other can follow the thread. I am also sending this the list. > Running R-1.15.0 (x64) on Windows 7. I assume you mean R2.15.0 > > The data

[R] Parallel writes in R

2012-04-02 Thread Jonathan Greenberg
R-helpers: I'm curious what support R has for parallel writes to a binary file? If I want to use snow to have each node write different "rows" of a flat binary file (possibly out of sequence), are there any tricks/issues I should be aware of? --j -- Jonathan A. Greenberg, PhD Assistant Professo

Re: [R] \Sexpr{}

2012-04-02 Thread Yihui Xie
just FYI: the knitr package supports HTML as well and will not be interfered by R2HTML. See http://yihui.name/knitr/demo/minimal/ Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Apr 2, 2

Re: [R] nls() error

2012-04-02 Thread Berend Hasselman
On 02-04-2012, at 20:48, Jeff Breiwick wrote: > Hello, > > I am running a simple nls model (which a friend ran OK) but I get the > following error: > > Error in nls(y ~ R * (1 - (x/K)^2), data = nls.dat, start = list(R = 0.3, : > object 'R_nls_iter' not found > > Does anyone know what the

[R] nls() error

2012-04-02 Thread Jeff Breiwick
Hello, I am running a simple nls model (which a friend ran OK) but I get the following error: Error in nls(y ~ R * (1 - (x/K)^2), data = nls.dat, start = list(R = 0.3, : object 'R_nls_iter' not found Does anyone know what the 'R_nls_iter' error is? The data are: x=1:8 ; y=c(14,19,25,34,43

[R] Requirement for Java Developer [REQ:104605]

2012-04-02 Thread Mir Mukarram Ali
[1]Click here to unsubscribe if you no longer wish to receive our emails Dear Partner, Here is our Direct client requirement which can be filled immediately. Kindly respond to this requirement with your consultant resume, contact and current location info to speed up

[R] Error in gamma(delta + (complex(0, 0, 1) * (x - mu))/alpha) : unimplemented complex function

2012-04-02 Thread Guaramy
I am trying to obtain the grafic of a pdf . but this error keeps showing . Here is the code MXN.fd = function(x,alpha,beta,mu,delta) { A = (2*cos(beta/2))^(2*delta) B = 2*alpha*pi*gamma(2*delta) C = (beta*(x-mu))/alpha D = abs(gamma(delta + (complex(0,0,1)*(x-mu))/alpha)^2) M = A/B*exp(C)*D M plot

[R] lattice: multiple plots on the same page across pages

2012-04-02 Thread Jeff LI
Dear All, I have two sets of plots: plot.1 is a set of qqplots that contains 3 pages and 1 panel per page; plot.2 is a set of xyplot that also contains 3 pages and 1 panel per page. These two sets of plots are conditioning on the same variable so I want to generate a display that shows both the q

Re: [R] Error, Variable is missing

2012-04-02 Thread Guaramy
Thanks Michael , its works perfectly now. -- View this message in context: http://r.789695.n4.nabble.com/Error-Variable-is-missing-tp4515418p4526683.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list http

Re: [R] unable to move temporary installation

2012-04-02 Thread Drew Tyre
OK - so I followed the following steps, which I think rule out those causes 1) I uninstalled all remaining versions of R, and then deleted all the directories in c:\progra~1\R 2) I restarted the computer 3) I installed 2.14.2, and attempted to install the Rcmdr package. Same error message for both

Re: [R] Cox model approximaions (was "comparing SAS and R survival....)

2012-04-02 Thread AO_Statistics
I have a question about Cox's partial likelihood approximations in "coxph" function of "survival package (and in SAS as well) in the presence of tied events generated by grouping continuous event times into intervals. I am processing estimations for recurrent events with time-dependent covariates i

Re: [R] R process taking over memory

2012-04-02 Thread Ramiro Barrantes
Oops, yes, I am using CentOS Linux 6.0, R 2.14.1 and nlme 3.1-103 I looked at the problem more carefully. For some datasets applied to nlme, nlme gets "stuck" in one of the iterations and the memory usage just grows and grows. nlme works by alternating between solving two conditional optimizati

[R] Prediction on link- and responselevel for glm

2012-04-02 Thread Fredrik Lundgren
Dear R-ers, We are doing prediction of risk for aortic aneurysm in screened subjects based on different riskfactors. When we do the prediction on the linklevel and transform the prediction and the limits of the 95%- confidence intervall (with exponentiation and then transformation from odd

Re: [R] Error: (subscript) logical subscript too long

2012-04-02 Thread Peter Ehlers
On 2012-04-02 08:52, IOANNA wrote: Hello, I am trying to perform a logistic regression using counts. For example: cedegren<- read.table("http://www.cloudstat.org/index.php?do=/attachment/download/id_95 /", header=T) attach(cedegren) ced.del<- cbind(sDel, sNoDel) ced.logr<- glm(ced.del ~ cat + f

Re: [R] How to adjust the stack size of R

2012-04-02 Thread Uwe Ligges
On 02.04.2012 10:04, Christofer Bogaso wrote: Hi Uwe, you said 'You need at least 76252 obs and that means the design matrix needs> 46 Gbyte! ' Can you please explain me how you come up with these 2 numbers? Is the number '76252 = 76251 + 1 (1 for the intercept in the model)' somehow related

Re: [R] Nested brew call yields Error in .brew.cat(26, 28) : unused argument(s) (26, 28)

2012-04-02 Thread Chris Beeley
Many thanks for this. I have a follow-up question. The output that I have from the nested brew call includes output like this: NANANANANANANANAN ... then a graph or a table ... then more NANANANANANANANANNANANANANANANANANNANANANANANANANANNANANANANANANANAN ... etc. It only occurs in the nes

Re: [R] simulate correlated binary, categorical and continuous variable

2012-04-02 Thread Petr Savicky
On Sun, Apr 01, 2012 at 06:00:43PM -0700, Burak Aydin wrote: > Hello Greg, > Sorry for the confusion. > Lets say, I have a population. I have 6 variables. They are correlated to > each other. I can get you pearson correlation, tetrachoric or polychoric > correlation coefficients. > 2 of them conti

Re: [R] How to put latex mdframed side by side (separated by space) ?

2012-04-02 Thread mlell08
Hi, as long as you don't want to stetch the frames across a page break, would minipges do? \documentclass[12pt]{article} \usepackage{lipsum} \begin{document} \begin{minipage}[t]{0.45\textwidth} \lipsum[1] \end{minipage} \hfill \begin{minipage}[t]{0.45\textwidth} \lipsum[2] \end{minipag

Re: [R] summaryBy: transformed variable on RHS of formula?

2012-04-02 Thread Gabor Grothendieck
On Mon, Apr 2, 2012 at 11:58 AM, Alexander Shenkin wrote: > Hi Folks, > > I'm trying to cut my data inside the summaryBy function.  Perhaps > formulas don't work that way?  I'd like to avoid adding another column > if possible, but if I have to, I have to.  Any ideas? > > Thanks, > Allie > >    re

Re: [R] summaryBy: transformed variable on RHS of formula?

2012-04-02 Thread Søren Højsgaard
Sorry, no - you will have to do something like the latter suggestion. Regards Søren -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Alexander Shenkin Sent: 2. april 2012 17:59 To: r-help@r-project.org Subject: [R] summaryBy: transf

Re: [R] \Sexpr{}

2012-04-02 Thread Eik Vettorazzi
Hi Hua, try options(SweaveSyntax="SweaveSyntaxNoweb") before sweaving your file (see A.14 in the FAQ section of the manual). In most cases R2HTML interferes with Sweave, causing your problem hth. Am 02.04.2012 15:12, schrieb Liang, Hua: > Did anyone know whether the problem " it doesn't evalua

[R] summaryBy: transformed variable on RHS of formula?

2012-04-02 Thread Alexander Shenkin
Hi Folks, I'm trying to cut my data inside the summaryBy function. Perhaps formulas don't work that way? I'd like to avoid adding another column if possible, but if I have to, I have to. Any ideas? Thanks, Allie require(doBy) df = dataframe(a <- rnorm(100), b <-rnorm(100)) summary

[R] Error: (subscript) logical subscript too long

2012-04-02 Thread IOANNA
Hello, I am trying to perform a logistic regression using counts. For example: cedegren <- read.table("http://www.cloudstat.org/index.php?do=/attachment/download/id_95 /", header=T) attach(cedegren) ced.del <- cbind(sDel, sNoDel) ced.logr <- glm(ced.del ~ cat + follows + factor(class), family=bi

Re: [R] how to read netcdf file in R

2012-04-02 Thread David William Pierce
On Mon, Apr 2, 2012 at 1:54 AM, Yogesh Tiwari wrote: > How  to read netcdf files in R ? > Which packeges do we need to install for this, > and what commands are used for reading netcdf files. Typical code would look something like this: library('ncdf'') filename <- 'data.nc' varname <- 'Temper

Re: [R] rgl package broke with R 2.14.2

2012-04-02 Thread David Winsemius
On Mar 28, 2012, at 10:15 AM, Duncan Murdoch wrote: On 12-03-27 6:31 PM, Grimes Mark wrote: Dear People I can't figure out how to fix this problem: rgl won't run under R 2.14.2 (it was working for me before under 2.14.0). The error message is: rgl is currently changing fairly rapidly. I'

Re: [R] NaN - trouble fixing NaN

2012-04-02 Thread William Dunlap
Also, mean(x) will generate NaN's if both Inf and -Inf are in x. E.g., > group <- c("A","A","A", "B","B","B", "C","C", "D","D") > when <- c( 1,2,3, -Inf,4,Inf, NA,5,NaN,6) > tapply(when, group, mean) A B C D 2 NaN NA NaN > tapply(when, group, mean, na.r

Re: [R] Non-linear least squares

2012-04-02 Thread Peter Ehlers
On 2012-04-01 17:31, n.surawski wrote: Greetings, I am having some troubles with the nls() function in R V 2.14.2. I am doing some modelling where I want to predict the mass of leaf litter on the forest floor (X) as a function of time since fire (t). Fortunately, I have a differential equation

[R] gnm and gnlr3

2012-04-02 Thread Joachim Audenaert
Hi, I am quite new to R and would like to do nonlinear regressions with Poisson distributed data. I would like to estimate paramters of an equation of this type: FR = [c*NO * exp(a+b*NO)] / [(c+NO)*(1+exp(a+b*NO))] a,b and c are parameters, NO are input values I found both the gnm and gnlr3 f

[R] \Sexpr{}

2012-04-02 Thread Liang, Hua
Did anyone know whether the problem " it doesn't evaluate \Sexpr{} in Sweave" has been fixed? I checked r help page and realized it was asked a couple of years ago. But I didn't find solutions. Thanks for your help in advance! Hua [[alternative HTML version deleted]]

[R] fatal error prevents multi-line functions or loop to run

2012-04-02 Thread Ebrahim Jahanshiri
Dear all, I have written some function that can go up to many lines. Two of the lines give warning errors like: Error in print()[c(1, : error in evaluating the argument 'x' in selecting a method for function 'print': Error in ... regions with no neighbours found now obviously this kind

Re: [R] How do I get a rough quick utility plot of a time series?

2012-04-02 Thread Hurr
Thanks Michael, sounds right, will try later today when I have time. -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-get-a-rough-quick-utility-plot-of-a-time-series-tp4522709p4526310.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Limitation on number of variables and data points in clustering

2012-04-02 Thread David L Carlson
You should probably read the posting guide, but the answer is "Yes." -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help

Re: [R] table: output: all variables in rows

2012-04-02 Thread David Winsemius
On Apr 2, 2012, at 7:11 AM, Marion Wenty wrote: Dear people, I would like to create a table out of a data.frame. How can I determine, which variables are put in the rows and which in the columns? I would like to get all the variables in the ROWS: I am including a simple example: D<-data.

Re: [R] How do I get a rough quick utility plot of a time series?

2012-04-02 Thread R. Michael Weylandt
Yes, zoo is a package for irregular time series but it needs to be installed (only once) and loaded (again every new session) install.packages("zoo") # Will install library(zoo) # Do this every session Michael On Mon, Apr 2, 2012 at 10:31 AM, Hurr wrote: > I tried ?zoo, but it's not available.

Re: [R] How do I get a rough quick utility plot of a time series?

2012-04-02 Thread Hurr
I tried ?zoo, but it's not available. Do I do something to make it available? Thanks Sarah, it's incomprehensible to me too. That's why I showed you the data and asked. -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-get-a-rough-quick-utility-plot-of-a-time-series-tp4522

Re: [R] how can i get AIC value for AR model

2012-04-02 Thread Ravi Kulkarni
If you look at the documentation for ar, you will find the following description of aic: aic The differences in AIC between each model and the best-fitting model So this means that your model order is 5 (look at the pacf). If you want the actual AIC of your model: (I call your datafi

[R] Limitation on number of variables and data points in clustering

2012-04-02 Thread Krati Agarwal
Hi All, Is there a limit on number of variables and the number of data points for clustering in R? Thanks for your help in advance! -- View this message in context: http://r.789695.n4.nabble.com/Limitation-on-number-of-variables-and-data-points-in-clustering-tp4525874p4525874.html Sent from the

[R] gamm: tensor product and interaction

2012-04-02 Thread Mabille, Geraldine
Hi list, I'm working with gamm models of this sort, using Simon Wood's mgcv library: gm<- gamm(Z~te(x,y),data=DATA,random=list(Group=~1)) gm1<-gamm(Z~te(x,y,by=Factor)+Factor,data=DATA,random=list(Group=~1)) with a dataset of about 7 rows and 110 levels for Group in order to test whether tenso

[R] Problem with fa.poly in "psych" package

2012-04-02 Thread Bryan J. Maloney
I am attempting to use the psych package to do EFA on a set of data that mixes dichotomous and 5-value "ordinal" variables. I tried using fa.poly with disappointing results. When I use a data subset that consists solely of dichotomous or solely of 5-value variables, fa.poly works. However, w

[R] comparison of stochastic matrices

2012-04-02 Thread gabaligeti
Dear List Members, i am looking for a statistical method or test wich helps me to verify the equality of two stochastic matrices (the sums in the rows = 1). Could you help me? Thanks! regards, galla -- View this message in context: http://r.789695.n4.nabble.com/comparison-of-stochastic-matrices

Re: [R] Unwanted page break in Rd2pdf

2012-04-02 Thread Duncan Murdoch
On 02/04/2012 9:57 AM, Johannes Radinger wrote: Hi, I want to create a pdf of my Man-pages from my package. Therefore I run in the terminal Rd2pdf on the package and a pdf of all the pages is created. After the titlepage there is the general package page, which includes "Description" and "Detai

Re: [R] A function like sum but with functions other than '+'

2012-04-02 Thread Julio Sergio
Michael Sumner gmail.com> writes: > > Try ?Reduce > Thanks Michael! --Sergio. __ 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] Unwanted page break in Rd2pdf

2012-04-02 Thread Johannes Radinger
Hi, I want to create a pdf of my Man-pages from my package. Therefore I run in the terminal Rd2pdf on the package and a pdf of all the pages is created. After the titlepage there is the general package page, which includes "Description" and "Details" etc. Unfortunately after the Subtitle "Details

Re: [R] How do I get a rough quick utility plot of a time series?

2012-04-02 Thread R. Michael Weylandt
Convert your data to a zoo object and plot() that. ?zoo There's a whole bunch of documentation for plot.zoo available. Michael On Mon, Apr 2, 2012 at 9:49 AM, Hurr wrote: > Thanks much for the reply. > I did the ?ts and it seems to be for equal interval time series. > Our time series are hardl

Re: [R] How do I get a rough quick utility plot of a time series?

2012-04-02 Thread Sarah Goslee
Hi, On Mon, Apr 2, 2012 at 9:49 AM, Hurr wrote: > Thanks much for the reply. > I did the ?ts and it seems to be for equal interval time series. > Our time series are hardly ever equal interval. > The time is in the first column used for the abscissa. > Probably need the easiest simplest tier plot

Re: [R] linear-by-linear association model in R?

2012-04-02 Thread Vito Muggeo (UniPa)
dear Christofer, Try the following d<-expand.grid(a=1:3,b=1:4) d$freq<-rpois(12,5) o<-glm(freq~factor(a)+factor(b)+I(a*b), family=poisson, data=d) vito Il 02/04/2012 9.34, Christofer Bogaso ha scritto: Dear all, can somebody give me some pointer how I can fit a "linear-by-linear association

Re: [R] How do I get a rough quick utility plot of a time series?

2012-04-02 Thread Hurr
Thanks much for the reply. I did the ?ts and it seems to be for equal interval time series. Our time series are hardly ever equal interval. The time is in the first column used for the abscissa. Probably need the easiest simplest tier plot. When I say plot, it wants limits and stuff. I guess it ca

Re: [R] ff usage for glm

2012-04-02 Thread Benilton Carvalho
Did you try the example described on the ff man page? On Monday, April 2, 2012, Bond, Stephen wrote: > Thomas, > > I tried biglm and it does not work see > > > http://r.789695.n4.nabble.com/unable-to-get-bigglm-working-ATTN-Thomas-Lumley-td2276524.html#a2278381 > > . There are other posts from pe

Re: [R] How to export plot outputs as "gif"

2012-04-02 Thread R. Michael Weylandt
caTools::write.gif() Michael On Mon, Apr 2, 2012 at 12:41 AM, mrzung wrote: > Hi, I really need to export plot image as "gif". > I know that other image forms are available with functions like png(), > jpeg() etc. > However, > > The reason that I only need the "gif" form is >                    

Re: [R] NaN - trouble fixing NaN

2012-04-02 Thread R. Michael Weylandt
Without seeing data, it's only a guess, but you should pass na.rm = TRUE to mean() so it will pass over NaNs in the data : tapply(HSuccess, Aeventexhumed, mean, na.rm=TRUE) Cheers, Michael On Sun, Apr 1, 2012 at 7:27 PM, Jhope wrote: > Hi R-listers, > > I am using the package plyr. I am just tr

Re: [R] ff usage for glm

2012-04-02 Thread Bond, Stephen
Thomas, I tried biglm and it does not work see http://r.789695.n4.nabble.com/unable-to-get-bigglm-working-ATTN-Thomas-Lumley-td2276524.html#a2278381 . There are other posts from people who cannot get biglm working and others who get strange results. Please, advise if you can help. I have row b

Re: [R] how to read netcdf file in R

2012-04-02 Thread Adrienne Wootten
Yogesh, The package I most commonly use for reading and working with netcdfs is called ncdf. It has a collection of commands for working with netcdf files, but the open command is open.ncdf in this package Adrienne -- Adrienne Wootten Graduate Research Assistant State Climate Office of North C

Re: [R] linear-by-linear association model in R?

2012-04-02 Thread Michael Friendly
On 4/2/2012 3:34 AM, Christofer Bogaso wrote: Dear all, can somebody give me some pointer how I can fit a "linear-by-linear association model" (i.e. loglinear model for the ordinal variables) in R? A brief description can be found here 'https://onlinecourses.science.psu.edu/stat504/node/141'. Th

Re: [R] Bootstrapped Tobit regression - get standard error 0...

2012-04-02 Thread Achim Zeileis
On Mon, 2 Apr 2012, Ravi Kulkarni wrote: I am trying to work out a bootstrapped Tobit regression model. I get the coefficients all right, but they all have standard error zero. And I am unable to figure out why. I know the coefficients are correct because that's what I get when do a Tobit (witho

[R] Bootstrapped Tobit regression - get standard error 0...

2012-04-02 Thread Ravi Kulkarni
I am trying to work out a bootstrapped Tobit regression model. I get the coefficients all right, but they all have standard error zero. And I am unable to figure out why. I know the coefficients are correct because that's what I get when do a Tobit (without bootstrapping). Here's my code: # Bootst

[R] how to read netcdf file in R

2012-04-02 Thread Yogesh Tiwari
Dear R Users, I am using R 2.14.1 on windows How to read netcdf files in R ? Which packeges do we need to install for this, and what commands are used for reading netcdf files. Thanks, Best Regards, Yogesh Tiwari -- Yogesh K. Tiwari (Dr.rer.nat), Scientist, Centre for Climate Change Resear

[R] How to put latex mdframed side by side (separated by space) ?

2012-04-02 Thread Manish Gupta
Hi, I have one query regarding latex. I am working on latex and i need to put two mdframes side (separated by space) on A4 paper size. How can i implement it? Thanks -- View this message in context: http://r.789695.n4.nabble.com/How-to-put-latex-mdframed-side-by-side-separated-by-space-tp452

[R] table: output: all variables in rows

2012-04-02 Thread Marion Wenty
Dear people, I would like to create a table out of a data.frame. How can I determine, which variables are put in the rows and which in the columns? I would like to get all the variables in the ROWS: I am including a simple example: D<-data.frame(age=c(8,9,10),county=c("B","W","W")) the output

[R] how to model check in cozigam

2012-04-02 Thread barbara costa
Hi to all, I'd like to check my cozigam model with a continuous response. If I only had a GAM I could do gam.check(b), but with cozigam I'm not getting a way to check for residuals, fitted values, qq plot.. Even if I have to do it separately for zeros and non-zeros part, how can I assure that the f

[R] partial likelihood device

2012-04-02 Thread Dunia Scheid
Hello, I would like to get the partial likelihood device. fit <- coxph(Surv(stop,event)~rx+size+number,data=bladder) Does fit$loglik give the partial likelihood device? Many thanks, Dunia [[alternative HTML version deleted]] __ R-help@r-proj

[R] Make package out of own function

2012-04-02 Thread Johannes Radinger
Hello, I already posted that on stackoverflow[1], but although it's crossposting, I think this question can probably easier to be answered by other R-users on this list, which maintain packages etc. I would like to make a package out of a function. The function is working in a script, but when I

Re: [R] Selecting files with a particular string in filename

2012-04-02 Thread Rolf Turner
Doesn't grep() solve your problem? cheers, Rolf Turner On 02/04/12 10:51, Kumar Mainali wrote: I am trying to find an efficient way to select certain text files from a folder with thousands of text files. I used file.list function with a specific "pattern" to obtain 70 files for e

[R] R2wd: Insert MS Word field

2012-04-02 Thread Michael Bach
Hello Everyone, the basic idea is to generate an initial (MS Word) report by R (plots, tables and outline structure), pass this document around so everyone can add / change content (except plots and tables) and later to be able to update the R plot / table logic and update the already modified wor

[R] date-time series plot

2012-04-02 Thread mpavlic
Hi all, i have a date-time series plot like this : Datum-Ura;padavine;P-kum-15dni;BLPV-1N;T-BLPV-1N;BLPV-4N;T-BLPV-4N;BLPV-5N;T-BLPV-5N;pretok;N-min;N-max 1.1.2011 18:00;0.0;0.0;174.62;14.60;174.56;14.10;174.64;14.20;299.26;174.18;181.78 2.1.2011 0:00;0.0;0.0;174.60;14.60;174.60;14.10;174.64;14.2

Re: [R] How to adjust the stack size of R

2012-04-02 Thread Xiaobo Gu
>>> You would need do compile your own copy of R and increase the stack >>> size, > Can we do this at runtime? >That depends on your unstated OS. Uwe gave you an answer for Windows. >On many other OSes, the stack size is set up by the OS when the >process is started, and your OS documentation

Re: [R] get data from Perl arrays

2012-04-02 Thread Till Bayer
On 4/2/2012 8:20 AM, José Ramón Blas Pastor wrote: Hi, a very simple doubt, but I do not know how to manage this. I want to plot a histogram for all data in 'datos.txt'. b) How could I invoke R inside Perl to do the same?? #!/usr/bin/perl open(DAT,"datos.txt"); while () { chomp; push(@da

[R] [R-pkgs] New package joineR

2012-04-02 Thread Pete Philipson
Dear All, The 'joineR' package for the joint analysis of repeated measurements and time-to-event outcomes is now available on CRAN. The package contains utilities for creating and manipulating 'jointdata' objects, graphical summaries, a variogram function for estimating correlation structure, a

  1   2   >