[R] plotting wind rose data

2010-09-30 Thread David Potts
Hi List, I am trying to create a spatial representation of some wind data. I have the season, frequency, strength and direction of the wind from 10 different locations, the coverage of the area that I am interested in is not 100% there are small gaps in my coverage due to the location of the

[R] Unix batch to different nodes

2010-09-30 Thread Daisy Englert Duursma
Hello, I am struggling with computing nodes in Unix. I have the use of a Unix server that has 30 nodes and I would like to batch scripts. Here is an R example that results in 72 repeated tasks based on the 2 loops. If I wanted to send these out to the different nodes, each node has 1 task and

[R] interactive session

2010-09-30 Thread Pam
Hi guys, My concern is to create an automated process from the beginning to the end. I want to copy all my code together in one piece and paste it to R console and sit back and relax :) except one moment in which the program should ask me to enter a number.. and only then (only after getting

[R] R-squared in Robust Regression

2010-09-30 Thread Lim Hock Ann .
May I know how to find the R-squared for robust regression model? Thank you. Hock Ann [[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

[R] Several Lattice plots in one Plot

2010-09-30 Thread Marcus Drescher
Hi all, I've been trying for hours, but I do not find a Solution. I want to plot 12 variables over time in separate diagrams in one plot/window using lattice. Two columns, six rows. I used print with the split command, but the graphics are getting really small. Can someone please help me.

[R] Installing sp and rgdal libraries

2010-09-30 Thread Gary Nobles
Hi, I am still a bit of a beginner with R but I had it all working spgrass6, RMySQL, sp, etc... Then I wanted to install spatstat, this required updating R, all was going fine until I tried to connect to grass gis using spgrass6 library, it wouldn't let be install the package due to a

Re: [R] Hashing a set

2010-09-30 Thread Hans W Borchers
Lorenzo Isella lorenzo.isella at gmail.com writes: Dear All, I am given a time series such at, at every time t_i, I am given a set of data (every element of the set is just an integer number). What I need is an injective function able to map every set into a number (possibly an integer

Re: [R] Several Lattice plots in one Plot

2010-09-30 Thread Ken Knoblauch
Marcus Drescher drescher at tum.de writes: I've been trying for hours, but I do not find a Solution. I want to plot 12 variables over time in separate diagrams in one plot/window using lattice. Two columns, six rows. I used print with the split command, but the graphics are getting really

Re: [R] matrix plot

2010-09-30 Thread Jim Lemon
On 09/29/2010 08:55 PM, hairryharry wrote: Hi, Fairly new to R - have done basic plots but now faced with plotting a matrix/table of results -I know what I want but cannot find out how to do it. Basically have individual questions ( x) to which an organization can rate themselves 1-10 (y) what

Re: [R] plotting wind rose data

2010-09-30 Thread Dennis Murphy
Hi: Try this: library(sos) # install first if you don't have it findFn('wind rose') You'll find there are several packages with functions to produce wind rose plots. HTH, Dennis On Wed, Sep 29, 2010 at 11:12 PM, David Potts dave.po...@pinan.co.ukwrote: Hi List, I am

Re: [R] plotting wind rose data

2010-09-30 Thread David Potts
Thanks Denis, looks useful. I not trying to generate a wind rose per data point, I am trying to generate a raster map/shape file showing for example, the Prevailing Winds at a point midway between to wind roses. Hi: Try this: library(sos) # install first if you don't

Re: [R] (OT) Change of email address

2010-09-30 Thread Jim Lemon
On 09/30/2010 03:27 AM, Kevin E. Thorpe wrote: Ted is well aware of how to change his list email. He was advising people on the list who who have his old email address in their address books to remove it. How can we be sure, Kevin? This may be a desperate cry for help from Ted, cast adrift

[R] igraph / eigenvector centrality score

2010-09-30 Thread ricovaglio
Hi to all, I have two graphs with the same number of nodes but with different connectivities and also with a different number of clusters. The two graphs represent the same system under different conditions and then there is a one-to-one correspondence between a given node in the two graphs. It

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

2010-09-30 Thread Peter Ehlers
On 2010-09-27 15:20, Joshua Wiley wrote: Hi, Peter's suggestion is more general, but for just the weighted mean, there is a built in function you can use (I do not know of any basic weighted standard deviation or variance functions). dat- data.frame(age = 1:5, no = c(21, 31, 9, 12, 6))

Re: [R] (OT) Change of email address

2010-09-30 Thread Ted Harding
On 30-Sep-10 09:02:18, Jim Lemon wrote: On 09/30/2010 03:27 AM, Kevin E. Thorpe wrote: Ted is well aware of how to change his list email. He was advising people on the list who who have his old email address in their address books to remove it. How can we be sure, Kevin? This may be a

Re: [R] Installing sp and rgdal libraries

2010-09-30 Thread Gavin Simpson
On Thu, 2010-09-30 at 00:40 -0700, Gary Nobles wrote: Hi, I am still a bit of a beginner with R but I had it all working spgrass6, RMySQL, sp, etc... Then I wanted to install spatstat, this required updating R, all was going fine until I tried to connect to grass gis using spgrass6

Re: [R] plotting wind rose data

2010-09-30 Thread Jim Lemon
On 09/30/2010 04:12 PM, David Potts wrote: Hi List, I am trying to create a spatial representation of some wind data. I have the season, frequency, strength and direction of the wind from 10 different locations, the coverage of the area that I am interested in is not 100% there are small

Re: [R] Installing sp and rgdal libraries

2010-09-30 Thread Gary Nobles
hi thankyou for the help, I upgraded Ubuntu and it disabled some repositories, all fixed now -- View this message in context: http://r.789695.n4.nabble.com/Installing-sp-and-rgdal-libraries-tp2720313p2720493.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Controling R from MS Access

2010-09-30 Thread ONKELINX, Thierry
Dear Felipe, In the past I have done something similar. I had Access to run an R script in batch mode. The script reads data from Access, processes the data and puts data back in Access tables. The user hit a button in Access and see a blank console window popping up. When the console window

Re: [R] Opening a .R file with R (Windows)

2010-09-30 Thread Petr PIKAL
Hi One workaround in Windows You shall have SendTo folder located somewhere in system (depending on Windows version). Put a shortcut to R programme in that folder. Than you can click with right mouse button on *.r file, select send to and choose appropriate shortcut (in that case R) but you

Re: [R] ARIMA models - estimation prediction$se

2010-09-30 Thread DGR
Dear All Can anyone help me? fit - arima(USAccDeaths, order = c(0,1,1),seasonal = list(order=c(0,1,1 fit$sigma2 [1] 99346.89 So, the standard error for my first step prediction is sqrt(fit$sigma2)=315.1934 like predict(fit, n.ahead = 6)$se[1] predict(fit, n.ahead = 6) $pred Jan

Re: [R] Fitting a half-ellipse curve

2010-09-30 Thread Michael Bedward
Hello Niklaus, I'm not sure if the following is the sort of thing you are looking for (?) You can fit an ellipse to your data using a deterministic least squares method. The following is a function that I use to do this... fit.ellipse - function (x, y = NULL) { # Least squares fitting of an

Re: [R] Unix batch to different nodes

2010-09-30 Thread stephen sefick
This, I think, all depends on how the server is set up. On Thu, Sep 30, 2010 at 1:21 AM, Daisy Englert Duursma daisy.duur...@gmail.com wrote: Hello, I am struggling with computing nodes in Unix. I have the use of a Unix server that has 30 nodes and I would like to batch scripts. Here is

Re: [R] Regular expressions: offsets of groups

2010-09-30 Thread Titus von der Malsburg
Ok, we decided to have a shot at modifying gregexpr. Let's see how it works out. If anybody is interested in discussing this please contact me. R-help doesn't seem like the right place for further discussion. Is there a default place for discussing things like that? Thanks everybody for your

Re: [R] conditional assignment of colors in xyplot()

2010-09-30 Thread Deepayan Sarkar
On Mon, Sep 27, 2010 at 7:11 AM, nathan pellegrin nathan.pelleg...@gmail.com wrote: # Dear R Community, # I have this data frame: df1 - data.frame(        F1 = factor( c( rep(D1,12),rep(D2,12),rep(D3,12) ) ),        F2 = factor( rep( rep( paste(O,1:6,sep=), rep(2,6) ), 3) ),        F3 =

[R] how to make list() return a list of *named* elements

2010-09-30 Thread Hans Ekbrand
If I combine elements into a list b - c(22.4, 12.2, 10.9, 8.5, 9.2) my.c - sample.int(round(2*mean(b)), 5) my.list - list(b, my.c) the names of the elements seems to get lost in the process: str(my.list) List of 2 $ : num [1:5] 22.4 12.2 10.9 8.5 9.2 $ : int [1:5] 11 8 6 9 20 If I

Re: [R] cor() alternative for huge data set

2010-09-30 Thread Jyotasana Gulati
Peter, Many thank for suggesting me this package. I very much believe that this will help me. But I was trying to correlate all probes(correlation between entities not variables) to calculate differentially coexpressed gene sets using package coXpress in R. I could not reduce the number on the

Re: [R] how to make list() return a list of *named* elements

2010-09-30 Thread Henrique Dallazuanna
You should try: eapply(.GlobalEnv, I)[c('b', 'my.c')] On Thu, Sep 30, 2010 at 8:49 AM, Hans Ekbrand hans.ekbr...@sociology.gu.sewrote: If I combine elements into a list b - c(22.4, 12.2, 10.9, 8.5, 9.2) my.c - sample.int(round(2*mean(b)), 5) my.list - list(b, my.c) the names of the

Re: [R] interactive session

2010-09-30 Thread Niels Richard Hansen
Hi Fatih I believe that readLines(n=1) will do the job. It works fine from the Windows RGui, but I noticed that it hangs my Aquamacs/ESS when R runs from there, and a C-g was needed (which may be completely irrelevant to you). Best, Niels On 30/09/10 08.55, Pam wrote: Hi guys, My concern is

Re: [R] Opening a .R file with R (Windows)

2010-09-30 Thread Nutter, Benjamin
Here's a thread that has some good discussion on the topic http://r.789695.n4.nabble.com/Running-script-with-double-click-td1579014.html -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Bert Gunter Sent: Tuesday, September 28, 2010

Re: [R] How to get a proportion of a Vector Member

2010-09-30 Thread Petr PIKAL
Hi or prop.table(table(foo)) Regards Petr r-help-boun...@r-project.org napsal dne 30.09.2010 03:45:30: On Wed, Sep 29, 2010 at 6:43 PM, Gundala Viswanath gunda...@gmail.com wrote: I have a vector that looks like this: foo [1] o o o x o o o o o x x o x How can we find the

Re: [R] how to make list() return a list of *named* elements

2010-09-30 Thread Gabor Grothendieck
On Thu, Sep 30, 2010 at 7:49 AM, Hans Ekbrand hans.ekbr...@sociology.gu.se wrote: If I combine elements into a list b - c(22.4, 12.2, 10.9, 8.5, 9.2) my.c - sample.int(round(2*mean(b)), 5) my.list - list(b, my.c) the names of the elements seems to get lost in the process: str(my.list)

Re: [R] What's the meaning of Species ~ . in IRIS data

2010-09-30 Thread S Ellison
See ?lm and, more usefully, ?formula Gundala Viswanath gunda...@gmail.com 29/09/2010 15:51 I am refering to a function call like this: data(iris) x - svmlight(Species ~ ., data = iris) I tried to see the content of it by typing: Species ~ . but it gives nothing. How can I see it's

Re: [R] String split and concatenation

2010-09-30 Thread Greg Snow
Steven, I noticed that I hit the send button too early. I answered the question you asked, but probably not the one that you should be asking. Why do you want to do this? It looks suspiciously like you are trying to create code to then evaluate. That is usually like printing a document,

Re: [R] Unix batch to different nodes

2010-09-30 Thread Ben Bolker
stephen sefick ssefick at gmail.com writes: This, I think, all depends on how the server is set up. On Thu, Sep 30, 2010 at 1:21 AM, Daisy Englert Duursma daisy.duursma at gmail.com wrote: Hello, I am struggling with computing nodes in Unix. I have the use of a Unix server that

Re: [R] Opening a .R file with R (Windows)

2010-09-30 Thread Gabor Grothendieck
On Tue, Sep 28, 2010 at 1:11 PM, Kye Gilder kye.gil...@gmail.com wrote: I am new to using R.  I installed R on my computer (Windows) and everything things appears to be just fine.  However, I have a simple script RTest.R that does a few simple calculations.  When I double-click the RTest.R

Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Ben Bolker
Gaspard Lequeux Gaspard.Lequeux at biomath.ugent.be writes: Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals =

[R] AIC for tweedie glm

2010-09-30 Thread eleadbeater
Dear R-users, I'm trying to model some data using a tweedie GLM approach. My response variable is the number of pupae that are the offspring of a subordinate wasp on a wasp's nest. However, they're not count data- for each nest, I only know the mean number of pupae per subordinate, which is

Re: [R] conditional assignment of colors in xyplot()

2010-09-30 Thread nathan pellegrin
Thank you, Deepayan, for the answer - and for creating amazingly helpful tools! Thanks also to Jim Lemon who pointed out a typo in the code: S2 .025 should read S2 .025, Nathan On Thu, Sep 30, 2010 at 5:21 AM, Deepayan Sarkar deepayan.sar...@gmail.comwrote: On Mon, Sep 27, 2010 at 7:11 AM,

Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Ravi Varadhan
I get this on Windows (it does not crash): library(minqa) library(rgl) newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced This tells me that you should be constraining your

Re: [R] Ordered logit with polr won't match SPSS output

2010-09-30 Thread Juliet Hannah
I think the most common reason to see different parameter estimates with ordinal regression is that programs set up the model differently. For example, check out library(MASS) ?polr We see polr uses: logit P(Y = k | x) = zeta_k - eta and notes that other software packages may use the opposite

Re: [R] AIC for tweedie glm

2010-09-30 Thread Ben Bolker
eleadbeater e.leadbeater at sussex.ac.uk writes: Dear R-users, I'm trying to model some data using a tweedie GLM approach. My response variable is the number of pupae that are the offspring of a subordinate wasp on a wasp's nest. However, they're not count data- for each nest, I only know

[R] polr, lrm - ordinal data

2010-09-30 Thread Chris Mcowen
Dear List, I have developed a model and am looking to predict a response for 1-6 ( it is ordered i.e the difference between level 1 and 2 is the same as between level 2 and 3 etc. I have used the predict function for a polr model (below) and a lrm model, and both give similar results, however

Re: [R] String split and concatenation

2010-09-30 Thread Gabor Grothendieck
On Wed, Sep 29, 2010 at 4:15 AM, Steven Kang stochastick...@gmail.com wrote: x - rep(letters[1:3], 2) Are there any ways to transform assign the above as the one shown below to an object? (in exact format; i.e length of 1 class of character), i.e x ('a', 'b', 'c', 'a', 'b', 'c') Highly

Re: [R] Fitting a half-ellipse curve

2010-09-30 Thread Niklaus Hurlimann
Hello Michael, Thanks very much for the hint to my problem this helps really a lot. Cheers Niklaus -- Niklaus Hürlimann Doctorant-PhD Université de Lausanne Institut de Minéralogie et Géochimie L'Anthropole CH-1015 Lausanne Suisse E-mail: niklaus.hurlim...@unil.ch Tel:+41(0)21 692 4452

Re: [R] AIC for tweedie glm

2010-09-30 Thread eleadbeater
Many thanks! Using a fresh session didn't work, but I upgraded to R.2.11.1 and it runs fine now. bbolker wrote: eleadbeater e.leadbeater at sussex.ac.uk writes: Dear R-users, I'm trying to model some data using a tweedie GLM approach. My response variable is the number of pupae that

Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Ravi Varadhan
You data is not good enough for the model that you are trying to fit (or conversely, the model is not appropriate for the data). Some of the parameters in your model will not be estimable because there is no information in the data. See the following: xvals =

[R] panel.pairs in splom

2010-09-30 Thread ibrito
Hello, I have a customized pairs () fonction as follows that displays correctely my data. panel.cor1 - function (x, y, digits=2, prefix=) { usr - par(usr); on.exit(par(usr)) par(usr = c(0, 1, 0,

Re: [R] panel.pairs in splom

2010-09-30 Thread ibrito
Sorry, I forget to define temp.df - sapply(1:10, function(i) rnorm(20, 0,1)) Best, Isabel -- View this message in context: http://r.789695.n4.nabble.com/panel-pairs-in-splom-tp2720948p2720968.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] panel.pairs in splom

2010-09-30 Thread ibrito
Indeed, some commands are missing. Sorry. My function is as follows, panel.cor1 - function (x, y, digits=2, prefix=) { usr - par(usr); on.exit(par(usr)) par(usr = c(0, 1, 0,

Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Gaspard Lequeux
Hej, On Thu, 30 Sep 2010, Ravi Varadhan wrote: I get this on Windows (it does not crash): library(minqa) library(rgl) newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced Does it

Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Gaspard Lequeux
Hej, On Thu, 30 Sep 2010, Ravi Varadhan wrote: You data is not good enough for the model that you are trying to fit (or conversely, the model is not appropriate for the data). Yes. I agree. However, this should not cause R to crash. (Around 100.000 models are fitted, and it is not possible

[R] getting the output after bootstraping

2010-09-30 Thread Michael Larkin
Thanks to the help of people from this forum I was able to bootstrap my data and then apply a model to it. Thanks for all your help. Everything worked out well, but I am having a difficult time getting the new parameter values. I bootstrapped the data 300 times and I want to get the 300

Re: [R] Polar coordinates - contour plots

2010-09-30 Thread koen
Like Todor I have been trying to make a contour plot using polar coordinates, unfortunately without success. The problem with converting to a cartesian system and plotting using e.g. filled.contour is that this function requires the same amount and value of x values for each y-value and also the

Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Ravi Varadhan
No. It still does not crash in Windows. library(rgl) library(minqa) Loading required package: Rcpp newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced Ravi.

[R] relevance vector machines for classification

2010-09-30 Thread Keith McMillan
The rvm function from the kernlab package can only be used for regression at the present time. In fact, in the description in the kernlab documentation for the type argument for rvm says, type rvm can only be used for regression at the moment. Are there any R packages that do classification

Re: [R] cor() alternative for huge data set

2010-09-30 Thread Peter Langfelder
Hi Jyotasana, if I understand your aim correctly, you want to find correlated sets (clusters) of genes, and then find those clusters that are differentially expressed? You can do that with WGCNA, or you can just use the projectiveKMeans for splitting your probes into blocks and then feed each

Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Katharine Mullen
I also cannot reproduce the crash. sessionInfo() R version 2.11.1 (2010-05-31) x86_64-unknown-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8

Re: [R] Understanding linear contrasts in Anova using R

2010-09-30 Thread Ista Zahn
Hi Professor Howell, I think the issue here is simply in the assumption that the regression coefficients will always be equal to the product of the means and the contrast codes. I tend to think of regression coefficients as the quotient of the covariance of x and y divided by the variance of x,

[R] Can this code be written more efficiently?

2010-09-30 Thread Guelman, Leo
Dear users, I'm working on binary classification problem using Support Vector Machines (SVM). My objective is to train a series of SVM models on a grid of hyperparameters and then select those that maximize the AUC based on an independent validation sample. My attempted code is shown below. It

[R] how to avoid NaN in optim()

2010-09-30 Thread arindam fadikar
hi , lik - function(nO, nA, nB, nAB){ loglik - function(par) { p=par[1] q=par[2] r - 1 - p - q if (c(p,q,r) rep(0,3) c(p,q,r) rep(1,3) ) { -(2 * nO * log (r) + nA * log (p^2 + 2 * p * r) + nB * log (q^2 + 2 * q * r) + nAB *

Re: [R] Understanding linear contrasts in Anova using R

2010-09-30 Thread Max Kuhn
These two resources might also help: http://cran.r-project.org/doc/contrib/Faraway-PRA.pdf http://cran.r-project.org/web/packages/contrast/vignettes/contrast.pdf Max On Thu, Sep 30, 2010 at 1:33 PM, Ista Zahn iz...@psych.rochester.edu wrote: Hi Professor Howell, I think the issue here

[R] (no subject)

2010-09-30 Thread Robert Quinn
Hello, I am having a problem figuring out how to model a continuous outcome (y) given a continuous predictor (x1) and two levels of nested categorical predictors (x3 nested in x2). The data are observational, not from a designed experiment. There are about 15 levels of x2 and between 3 and 14

[R] nested unbalanced regression analysis

2010-09-30 Thread Robert Quinn
Hello, I am having a problem figuring out how to model a continuous outcome (y) given a continuous predictor (x1) and two levels of nested categorical predictors (x3 nested in x2). The data are observational, not from a designed experiment. There are about 15 levels of x2 and between 3 and 14

Re: [R] how to avoid NaN in optim()

2010-09-30 Thread Ravi Varadhan
Change the `else NA' to `else Inf' in your loglik function and then run the following: library(BB) p0 - runif(2) spg(p0, lik (176,182 , 60 ,17) , lower=0, upper=1) This will give you correct results. Ravi. Ravi

Re: [R] how to avoid NaN in optim()

2010-09-30 Thread Ravi Varadhan
I forgot to mention: You actually got correct results with using optim and `CG'. The warning messages were just telling you that there were some log(negative number) operations during the iterative process. Ravi. Ravi

Re: [R] how to avoid NaN in optim()

2010-09-30 Thread Ravi Varadhan
You also need the constrain that par[1] + par[2] 1 in order to avoid NaNs. You can do this using the `projectLinear' argument in `spg'. library(BB) ?spg Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of

Re: [R] how to avoid NaN in optim()

2010-09-30 Thread arindam fadikar
thanks Ravi yes , we were getiing the correct results but we thought there should be a way to avoid those NaN values ... and now we are done the if condition was written wrongly there ... instead of that if we do p 0 q 0 r 0 p 1 q 1 r 1 its perfectly fine .. but is there a smart

Re: [R] how to avoid NaN in optim()

2010-09-30 Thread Ravi Varadhan
Here is how you do it: library(BB) Amat - matrix(c(1,0,0,1,-1,-1), 3, 2, byrow=TRUE) b - c(0, 0, -1) p0 - c(0.5, 0.4) spg(p0, lik ( 176,182 , 60 ,17) , project=projectLinear, projectArgs=list(A=Amat, b=b, meq=0)) Hope this helps, Ravi.

Re: [R] how to avoid NaN in optim()

2010-09-30 Thread Joshua Wiley
On Thu, Sep 30, 2010 at 12:04 PM, arindam fadikar arindam.fadi...@gmail.com wrote: thanks Ravi yes , we were getiing the correct results but we thought there should be a way to avoid those NaN values ... and now we are done the if condition was written wrongly there ... instead of that if

Re: [R] how to avoid NaN in optim()

2010-09-30 Thread Berend Hasselman
arindam fadikar wrote: loglik - function(par) { p=par[1] q=par[2] r - 1 - p - q if (c(p,q,r) rep(0,3) c(p,q,r) rep(1,3) ) { -(2 * nO * log (r) + nA * log (p^2 + 2 * p * r) + nB * log (q^2 + 2 * q * r) + nAB *

[R] Nested unbalanced regression analysis

2010-09-30 Thread Robert Quinn
Hello, I am having a problem figuring out how to model a continuous outcome (y) given a continuous predictor (x1) and two levels of nested categorical predictors (x3 nested in x2). The data are observational, not from a designed experiment. There are about 15 levels of x2 and between 3 and 14

[R] Sweave and LaTeX beamer class

2010-09-30 Thread Johannes Huesing
I am failing to uncover Sweave chunks step by step using the LaTeX beamer class. The following minimal example: \documentclass{beamer} \usepackage{Sweave} \begin{document} \begin{frame}[fragile] In the year \uncover2-{25}\uncover3-{\Sexpr{5*5}} \uncover4-{ echo=TRUE, print=TRUE= 5*5*101 @ }

[R] Problem comparing lme objects with anova using do.call

2010-09-30 Thread Michael Hallquist
Hi all, I am running some linear mixed models for longitudinal data using the nlme package. Part of the code I've developed tests for differences among models using the anova function, but I can't simply pass the corresponding lme objects as parameters to the anova function because some of the

Re: [R] interactive session

2010-09-30 Thread Pam
Thanks Niels but it won't do.. please copy and paste the 2 lines below together to your console in order to see what I mean: cat(?); a-readLines(n=1) b-paste(t,a,sep=) anyone / any idea to overcome this problem? Best, Fatih Niels wrote: Hi Fatih I believe that readLines(n=1) will do the

[R] Kernel density estimation - problem with matrix created in loop

2010-09-30 Thread Brocker84
Hi you all! I have a very serious problem. What I am going to do is a kernel density estimation (Nadaraya-Watson) but without any helping packages. I want to do it on my own and just use R as a calculator. The problem is that the matrix which I need does not seem to be calculated correctly in

[R] R 2.11.1 crashes

2010-09-30 Thread Steve Su
Dear R community, I was using R 2.11.1 without internet connection on Windows XP and whenever I type ?mean for example, R would freeze and crash out... Is this something that can be fixed? I would like to use the internel help file if possible... Thanks.

[R] Inserting a plot into another

2010-09-30 Thread Filoche
Hi everyone. I would like to know if it was possible to insert a plot into another one. For example I have a plot and I would like to add a smaller plot in the top right corner. Best regards, Phil -- View this message in context:

[R] getting just the x or the y coordinate

2010-09-30 Thread G.R.Nobles
I have a data set (from GRASSGIS) I have imported it to R and I can get the coordinates by: xy-coordinates(data) but I would like to have the x coordinates and y coordinates in separate dataframes x and y, does anyone know how to do this? Thankyou Gary --- Gary R. Nobles

[R] more than two NA value names in my data

2010-09-30 Thread JoonGi
my data(*.txt) has 1000 observations(numbers with no characters) of 5 variables. quite simple. However, NA values are quite tricky. this observer used more than two names for NA values; . and na and more. 1. If I don't want to manipulate this raw data at all, how can I read this table?

[R] polr, lrm - ordinal data

2010-09-30 Thread Chris Mcowen
Dear List, I have developed a model and am looking to predict a response for 1-6 ( it is ordered i.e the difference between level 1 and 2 is the same as between level 2 and 3 etc. I have used the predict function for a polr model (below) and a lrm model, and both give similar results, however

[R] time in year, month, day, hour ?

2010-09-30 Thread Yogesh Tiwari
Dear R Users, I did not get any reply on my question so I am re-asking. This time I am giving sample data: 160.3162 -13.5993 -0.4353 46.09380.1877 -0.194E-07 260.3713 -13.5992 -0.4423 46.12410.2057 -0.231E-06 360.3430 -13.5981 -1.6163

[R] xyplot - help please

2010-09-30 Thread Santosh
Dear R Gurus! I would like to generate a multi-panel plot with grouped and reference lines in each panel .. Example dataset and code are provide below. Where am I getting wrong in the code below? Any assistance will be highly appreciated. Thanks so much! -Santosh start dataset ---

[R] please help me....

2010-09-30 Thread butchman
ㅣ recently used laq packages author of this package is jan Ulbricht.. and I must read jan ulbricht's Ph.D thesis variable selection in generalized linear models but I didn't find this thesis on line and there is any method to view this thesis?? If anybody has this thesis file,please send to me...

Re: [R] more than two NA value names in my data

2010-09-30 Thread Joshua Wiley
Hi, You were on the right track with na.strings, from ?read.table na.strings: a character vector of strings which are to be interpreted as ‘NA’ values. Blank fields are also considered to be missing values in logical, integer, numeric and complex fields. so, you

Re: [R] Understanding linear contrasts in Anova using R

2010-09-30 Thread Peter Dalgaard
On 09/30/2010 08:31 PM, Max Kuhn wrote: These two resources might also help: http://cran.r-project.org/doc/contrib/Faraway-PRA.pdf http://cran.r-project.org/web/packages/contrast/vignettes/contrast.pdf Max They're a tad long though. Let me try and say it shorter: Contrast

Re: [R] time in year, month, day, hour ?

2010-09-30 Thread Joshua Wiley
Dear Yogesh, This will create a vector that I believe does what you want. x - as.POSIXct(x = cumsum(c(0, rep(3*60*60, 1919))), origin = 2009-01-01) Let me see if I can explain the logic. In the innermost part, I multiply 3*60*60, or hours*minutes*seconds. You said they were three hour blocks

Re: [R] Can this code be written more efficiently?

2010-09-30 Thread jim holtman
Have you tried using Rprof to determine where time is being spent in the current code? Have you looked at how much memory you are using? Are you paging? Have you run with a size 'x', then '2x' then '4x' to see what the growth in both CPU time and memory usage is? This is what I would do if I

Re: [R] Nested unbalanced regression analysis

2010-09-30 Thread Wil M Contreras Arbaje
Whoa, easy there: members of the list are volunteers, allow some time before expecting a reply... On Sep 30, 2010, at 3:19 PM, Robert Quinn wrote: Hello, I am having a problem figuring out how to model a continuous outcome (y) given a continuous predictor (x1) and two levels of

Re: [R] interactive session

2010-09-30 Thread Peter Dalgaard
On 09/30/2010 03:33 PM, Pam wrote: Thanks Niels but it won't do.. please copy and paste the 2 lines below together to your console in order to see what I mean: cat(?); a-readLines(n=1) b-paste(t,a,sep=) anyone / any idea to overcome this problem? Best, Fatih You might want to

[R] can I add line breaks to the paste() function?

2010-09-30 Thread David LeBauer
Can I add a line break to the paste() function to return the following: 'this is the first line' 'this is the second line' instead of 'this is the first line this is the second line' ? __ R-help@r-project.org mailing list

Re: [R] interactive session

2010-09-30 Thread Niels Richard Hansen
On 30/09/10 22.23, Peter Dalgaard wrote: On 09/30/2010 03:33 PM, Pam wrote: Thanks Niels but it won't do.. please copy and paste the 2 lines below together to your console in order to see what I mean: cat(?); a-readLines(n=1) b-paste(t,a,sep=) anyone / any idea to overcome this problem?

Re: [R] can I add line breaks to the paste() function?

2010-09-30 Thread Erik Iverson
Hello, Although on the surface a simple request, I think you need to be more specific. ?paste returns a character vector. The first question is: do you want a character vector of length 1 or 2? It sounds like you're trying to format text for display on screen or on a graphics device. Perhaps

Re: [R] interactive session

2010-09-30 Thread jim holtman
You might want to use the tcltk package so you can bring up a window in which to input your data. This is better than trying to read from the console especially when 'sourcing' in some files or when cutting/pasting. On Thu, Sep 30, 2010 at 2:55 AM, Pam fkira...@yahoo.com wrote: Hi guys, My

Re: [R] can I add line breaks to the paste() function?

2010-09-30 Thread Jeremy Miles
Try using cat instead. Then \n is the new line character. E.g. cat(1st line\n2nd line\n) Jeremy On 30 September 2010 13:30, David LeBauer dleba...@gmail.com wrote: Can I add a line break to the paste() function to return the following: 'this is the first line' 'this is the second line'

Re: [R] Inserting a plot into another

2010-09-30 Thread Greg Snow
Look at the subplot function in the TeachingDemos package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of

Re: [R] getting the output after bootstraping

2010-09-30 Thread David Winsemius
Michael Larkin wrote: Thanks to the help of people from this forum I was able to bootstrap my data and then apply a model to it. Thanks for all your help. Everything worked out well, but I am having a difficult time getting the new parameter values. I bootstrapped the data 300

Re: [R] please help me....

2010-09-30 Thread Joshua Wiley
Hi, I am not entirely certain how you think we can help. Many theses/dissertations are not widely published, but there is often a copy stored at the local institution's library. I would also assume that Jan Ulbricht has a copy, which if it is not available online and it is impossible for you to

Re: [R] interactive session

2010-09-30 Thread Phil Spector
If you don't mind the prompt of 1:, I think scan will do what you want: a = scan(n=1,what='',quiet=TRUE);b = paste(t,a,sep=''); 1: ada b [1] tada - Phil Spector Statistical Computing Facility

Re: [R] getting the output after bootstraping

2010-09-30 Thread Dennis Murphy
Hi: To amplify on David's point, the help page of nlsBoot (package nlstools) states that the function returns the following: nlsBoot returns a list of three objects: coefboot contains the bootstrap parameter estimates bootCI contains the bootstrap medians and the bootstrap 95% confidence

  1   2   >