Re: [R] Question about levels/as.numeric

2011-04-11 Thread Petr Savicky
On Sun, Apr 10, 2011 at 05:47:59PM +0200, Thibault Vatter wrote: Hi, I am still new to R and this is my first post on this mailing-list. I have two .csv (each one being a column of real numbers) coming from the same database (the first one is just longer than the second) and I read them

Re: [R] random sampling with levels and with replacement

2011-04-11 Thread taby gathoni
Andreas, Thanks alot. I  combined below and other suggestions given on r-help and it worked. --- On Fri, 4/8/11, Andreas Borg andreas.b...@unimedizin-mainz.de wrote: From: Andreas Borg andreas.b...@unimedizin-mainz.de Subject: Re: [R] random sampling with levels and with replacement

Re: [R] help question

2011-04-11 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 08.04.2011 18:24:37: On 08/04/2011 9:20 AM, DEBERGH Patrick wrote: hello I am at the very beginneing of using the R program I just don't understand how one can save a programfile For exemple, if I type in R 23+456 and want to save this

Re: [R] Question about levels/as.numeric

2011-04-11 Thread Thibault Vatter
Thanks Kent and Petr, the problem was indeed the C/missing value that I had to convert! Thanks Peter too, the factor explanation will also be quite usefull for further work. Best regards, Thibault On 11 April 2011 03:48, Rolf Turner rolf.tur...@xtra.co.nz wrote: On 11/04/11 10:08, Peter

Re: [R] Password-protect R script files

2011-04-11 Thread Kenn Konstabel
On Sun, Apr 10, 2011 at 8:18 PM, Vijayan Padmanabhan padmanabhan.vija...@gmail.com wrote: There was a question in R forum very long time back.. on how to protect R Script files from inadvertent editing by users. The good way to do it is to include the following comment at the beginning: # This

Re: [R] Password-protect R script files

2011-04-11 Thread Joshua Wiley
On Mon, Apr 11, 2011 at 12:21 AM, Kenn Konstabel lebats...@gmail.com wrote: On Sun, Apr 10, 2011 at 8:18 PM, Vijayan Padmanabhan padmanabhan.vija...@gmail.com wrote: There was a question in R forum very long time back.. on how to protect R Script files from inadvertent editing by users. The

Re: [R] Password-protect R script files

2011-04-11 Thread Petr Savicky
On Sun, Apr 10, 2011 at 10:48:19PM +0530, Vijayan Padmanabhan wrote: There was a question in R forum very long time back.. on how to protect R Script files from inadvertent editing by users. There is a way to do this from within R, atleast in Windows XP I have tried this and it certainly

[R] Odp: In need of help with correlations

2011-04-11 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 09.04.2011 19:24:38: I am in need of someone's help in correlating gene expression. I'm somewhat new to R, and can't seem to find anyone local to help me with what I think is a simple problem. I need to obtain pearson and spearman correlation

[R] Coding matrix equation

2011-04-11 Thread matthew.r.robin...@sheffield.ac.uk
Hi all, I have two matrices: G-matrix(c(2.0, 0.5, 0.5, 0.5, 2.0, 0.5, 0.5, 0.5,2.0),3,3) P-matrix(c(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5,1.0),3,3) and I want to run this equation to get a new matrix F: F = [P+2G]^-1/2 P [P+2G]^-1/2 Could someone please tell me how to code this in R? Many

Re: [R] xyplot, groups and colors

2011-04-11 Thread Philipp Pagel
On Fri, Apr 08, 2011 at 08:14:21AM -0700, Dennis Murphy wrote: Thanks to everyone who replied! Especialy this and the ggplot advice did what I wanted. xyplot(circumference~age, dat, groups=Tree, type='l', col.line = c('red', 'blue', 'blue', 'red', 'red')) This is essentially what I

[R] Odp: Coding matrix equation

2011-04-11 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 11.04.2011 09:43:03: Hi all, I have two matrices: G-matrix(c(2.0, 0.5, 0.5, 0.5, 2.0, 0.5, 0.5, 0.5,2.0),3,3) P-matrix(c(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5,1.0),3,3) and I want to run this equation to get a new matrix F: F =

Re: [R] Coding matrix equation

2011-04-11 Thread Joshua Wiley
Hi Matt, Petr gave you one possibility. If you are looking for more matrix operations see: ?%*% # the inner product of the matrices ?%o% # the outer product of the matrices ?( # for parentheses to help order things require(MASS) # load the package MASS ?ginv # for the generalized inverse of a

Re: [R] In need of help with correlations

2011-04-11 Thread Peter Langfelder
On Sat, Apr 9, 2011 at 10:24 AM, Sean Farris farris...@vcu.edu wrote: I am in need of someone's help in correlating gene expression. I'm somewhat new to R, and can't seem to find anyone local to help me with what I think is a simple problem. I need to obtain pearson and spearman correlation

Re: [R] How do I make this faster?

2011-04-11 Thread Andreas Borg
Hi Hasan, I'd be happy to help you, but I am not able to run your code. You use commandArgs to retrieve arguments of the R program, but which ones do you actually provide? Best regards, Andreas Hasan Diwan schrieb: I was on vacation the last week and wrote some code to run a 500-day

Re: [R] Help with basic loop

2011-04-11 Thread Ivan Calandra
Hi, I think you can do this without a loop (well, replicate() is based on sapply()): prob-numeric(1000) task1 - replicate(1000,runif(1, min=0.8, max= 0.9)) task2 - replicate(1000,runif(1, min=0.75, max= 0.85)) task3 - replicate(1000,runif(1, min=0.81, max= 0.89)) prob - task1*task2*task3 It

Re: [R] Password-protect R script files

2011-04-11 Thread Ivan Calandra
On Windows at least, you could set it as read only. The user can save an edited copy of it but cannot modify the original script. Le 4/11/2011 09:36, Petr Savicky a écrit : On Sun, Apr 10, 2011 at 10:48:19PM +0530, Vijayan Padmanabhan wrote: There was a question in R forum very long time

Re: [R] Help with basic loop

2011-04-11 Thread Dennis Murphy
Hi: Let's assume the lengths of each vector are the same so that they can be multiplied. Here's the timing on my machine: system.time(replicate(1000, { prob-numeric(1000) + + for (n in 1:1000) { + task1 - runif(1, min=0.8, max= 0.9) + task2 - runif(1, min=0.75, max= 0.85) + task3 - runif(1,

Re: [R] Help with basic loop

2011-04-11 Thread Ivan Calandra
Well, I was quite blind not to change 1 to 1000 in runif() and use replicate()!! It gets even faster if you create prob first. Ivan Le 4/11/2011 10:53, Dennis Murphy a écrit : Hi: Let's assume the lengths of each vector are the same so that they can be multiplied. Here's the timing on my

Re: [R] plot layout with several plots ON plot area of previous plot

2011-04-11 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/04/11 18:47, Greg Snow wrote: Some of the functions that were the first in the TeachingDemos package were originally written to help me visualize something, so it is not just teachers demoing, but people demoing to themselves. It has become

Re: [R] How do I make this faster?

2011-04-11 Thread Paul Hiemstra
On 04/11/2011 10:28 AM, Andreas Borg wrote: Hi Hasan, I'd be happy to help you, but I am not able to run your code. You use commandArgs to retrieve arguments of the R program, but which ones do you actually provide? Best regards, Andreas Hasan Diwan schrieb: I was on vacation the last

[R] heatmap clustering dendrogram export

2011-04-11 Thread boyang zhe
Hi, I am a beginner for R. I had use gplots to generate a heatmap as following: heatmap.2(matrix, col=topo.colors(75), dendrogram=column, Rowv=FALSE, trace=none, key=TRUE, keysize=0.8, density.info=none, cexRow=0.2, cexCol=0.6) It work well. It generate heatmap whith rcolumn clustering

Re: [R] rtmvt

2011-04-11 Thread Tóth Dénes
Hi there, Since you failed to provide us with data and sessionInfo(), I can only guess that for some reason you call the rtmvt.rejection function instead of rtmvt.gibbs. Just look at the code of rtvmt by typing: rtmvt There you can see that it is a wrapper for rtmvt.rejection or rtmvt.gibbs.

[R] Mclapply and print statement

2011-04-11 Thread Alaios
Dear all. I am using the mclapply function to split my code to the many cores my system has. It seems that is working fine. This is the parallel version of lcapply. The only problem that I seem to have is that the printf cannot print messages. The ideal to me is to have fro my function an

[R] pseudo-R by hand

2011-04-11 Thread Sacha Viquerat
hello dear list! since we want to do a model analysis and some people would like to see pseudo-R^2 values for different types of glm of a logistic regression, i've decided to write a function that computes either nagelkerkes normed pseudo-R or cox snells pseudo-R. however, i am not clear as

[R] Comparing execution times

2011-04-11 Thread Alaios
Dear all, In my 'simple' computer I was running some experiments to help me understand how faster a multicore lapply will be. I thought it might be interesting for some people to look at the results. Even though are not accurate, still might be a good indicator how much improvement there can

Re: [R] Question about levels/as.numeric

2011-04-11 Thread John Kane
--- On Sun, 4/10/11, Rolf Turner rolf.tur...@xtra.co.nz wrote: From: Rolf Turner rolf.tur...@xtra.co.nz Subject: Re: [R] Question about levels/as.numeric To: r-help@r-project.org Received: Sunday, April 10, 2011, 9:48 PM On 11/04/11 10:08, Peter Ehlers wrote: SNIP Checking anything

Re: [R] glm with multiple vars

2011-04-11 Thread dirknbr
Sascha Thanks that works. Dirk -- View this message in context: http://r.789695.n4.nabble.com/glm-with-multiple-vars-tp3438095p3441476.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] pseudo-R by hand

2011-04-11 Thread Achim Zeileis
On Mon, 11 Apr 2011, Sacha Viquerat wrote: hello dear list! since we want to do a model analysis and some people would like to see pseudo-R^2 values for different types of glm of a logistic regression, i've decided to write a function that computes either nagelkerkes normed pseudo-R or cox

[R] multiple comparisons with generalised least squares

2011-04-11 Thread Sandy Adriaenssens
Dear R users, I have used the following model: M1 - gls(Nblad ~ Concentration+Season + Concentration:Season, data=DDD, weights=varIdent(form=~ 1 | Season*Concentration)) to assess the effect of Concentration and Season on nitrogen uptake by leaves (Nblad). I accounted for the difference in

[R] Package fgui returns error: Object of type closure is not subsettable

2011-04-11 Thread nikhil abhyankar
Hello All, I have written three functions. First: To input user specified SAS dataset and plot the boxplots of relevant variables. Second: Extract the number of hours, minutes etc. from a variable describing a time-point using regular expressions. E.g. 'Per1, Day 2, 24 Hour' would

Re: [R] Coding matrix equation

2011-04-11 Thread Petr Savicky
On Mon, Apr 11, 2011 at 08:43:03AM +0100, matthew.r.robin...@sheffield.ac.uk wrote: Hi all, I have two matrices: G-matrix(c(2.0, 0.5, 0.5, 0.5, 2.0, 0.5, 0.5, 0.5,2.0),3,3) P-matrix(c(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5,1.0),3,3) and I want to run this equation to get a new matrix

[R] Polar Plots

2011-04-11 Thread ogbos okike
Dear List, Following the link below ( http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=plotrix:clock24.plot) I got an interesting polar plots which displayed my data and the time of observation. Thank you very much for providing such details. However, I have two set of data which I wish to display

Re: [R] About Tinn-R

2011-04-11 Thread JCFaria
Dear Marcos, Sorry, It is very difficult for me to know what happened on your computer! The fact is that the structure of the ini are corrupted. In this place Tinn-R stores all user preferences and configurations. It will really necessary to rename (or remove: in this case all your prior

Re: [R] Yearly aggregates and matrices

2011-04-11 Thread mathijsdevaan
Solved the problem: I guess I was still using the main version of zoo. Thanks again! -- View this message in context: http://r.789695.n4.nabble.com/Yearly-aggregates-and-matrices-tp3438140p3441723.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Converting edgelist to symmetric matrix/ plotting sparse network with lots of nodes

2011-04-11 Thread Mike Marchywka
Date: Sat, 9 Apr 2011 14:34:28 -0700 From: kmshafi...@yahoo.com To: r-help@r-project.org Subject: [R] Converting edgelist to symmetric matrix Hi, I have network data in the form of a couple of edgelists containing weights in the format x,y,weight whereby x represents row header and y

[R] [R-pkgs] plyr: version 1.5

2011-04-11 Thread Hadley Wickham
# plyr plyr is a set of tools for a common set of problems: you need to __split__ up a big data structure into homogeneous pieces, __apply__ a function to each piece and then __combine__ all the results back together. For example, you might want to: * fit the same model each patient subsets of

Re: [R] Quantile Regression and R

2011-04-11 Thread Sheldrick, Peter (Specialty Casualty UW Support)
Pls disregard...I have it figured out. Thank you. Regards, Peter D. Sheldrick Hartford Financial Services Group _ From: Sheldrick, Peter (Specialty Casualty UW Support) Sent: Friday, April 08, 2011 9:53 AM To:

Re: [R] Converting edgelist to symmetric matrix

2011-04-11 Thread Gary Weissman
Hi Shafique, If your edgelist is in the form of a text file (elist.csv) that looks like this: from, to, weight vertex1, vertex2, 3 vertex2, vertex3, 2.3 vertex4, vertex1, 1.2 ... you can convert that to a matrix using library(igraph) edge.list - read.csv(elist.csv,header=TRUE) g -

[R] Edate and EOmonth

2011-04-11 Thread Jorge Nieves
Hi, I was wondering if anyone could point me to the excel look alike Edate and eomonth functions in R. I have found the timeLastDayInMonth and timeFirstDayInMonth in the timeDate package. However, I am looking for a bit more flexibility. I would like to be able to obtain dates and EOM dates n

Re: [R] Edate and EOmonth

2011-04-11 Thread Whit Armstrong
I think Dirk has recently done some things w/ boost date time as an Rcpp based project bdt. http://cran.r-project.org/web/packages/RcppBDT/ChangeLog -Whit On Mon, Apr 11, 2011 at 10:11 AM, Jorge Nieves jorge.nie...@moorecap.comwrote: Hi, I was wondering if anyone could point me to the

Re: [R] Fitting controlled released data

2011-04-11 Thread Uwe Ligges
On 10.04.2011 21:22, EmaDaCuz wrote: Hi, I am new to the forum/mailing list. I have been using R for a while and I find it incredible. I was just wondering whether someone has ever written a library to calculate the best fit of experimental data to some controlled release models, having only

Re: [R] Edate and EOmonth

2011-04-11 Thread Dirk Eddelbuettel
On 11 April 2011 at 10:55, Whit Armstrong wrote: | I think Dirk has recently done some things w/ boost date time as an Rcpp | based project bdt. | | http://cran.r-project.org/web/packages/RcppBDT/ChangeLog It's on CRAN too at http://cran.r-project.org/web/packages/RcppBDT/ It may get an

[R] heatmap clustering dendrogram export

2011-04-11 Thread Amos Folarin
Hi boyang zhe, The dendrogram is stored in the object returned from heatmap.2 #e.g. x - heatmap.2(matrix(1:9,3)) dend.row - x$rowDendrogram class(dend.row) [1] dendrogram plot(tmp$rowDendrogram) Amos Folarin -- Forwarded message -- From: boyang zhe zheboy...@gmail.com

[R] Geographic distance between lat-long points in R?

2011-04-11 Thread Scott Chamberlain
Dear R, I have a bunch of geographic locations specified by lat-long coordinates. What's an easy way to calculate geographic distance between any two points? OR, perhaps there is a function for calculating a distance matrix for K sites? Sincerely, Scott Chamberlain

Re: [R] integration

2011-04-11 Thread Ravi Varadhan
It does. See `lower' and `upper' arguments. Why are y and z not known? Say, you want the marginal of x, i.e. integrate over x. Now, y and z are fixed. You fix them at different values, but they are known. Ravi. --- Ravi Varadhan, Ph.D.

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread Eik Vettorazzi
Hi Scott, have a look at the 'earth.dist'-function in the package 'fossil'. hth. Am 11.04.2011 17:37, schrieb Scott Chamberlain: Dear R, I have a bunch of geographic locations specified by lat-long coordinates. What's an easy way to calculate geographic distance between any two points?

[R] ordered logistic regression - cdplot and polr

2011-04-11 Thread Elizabeth Pringle
Hi, I have a dataset that I am trying to analyze and plot as an ordered logistic regression (y = ordinal categories 1-3, x = continuous variable with values 3-9). First is a problem with cdplot: Produces a beautiful plot, with the right trend, but my independent factor values are transformed.

Re: [R] Fast version of Fisher's Exact Test

2011-04-11 Thread Steven McKinney
Depends on how many other programs, and how large they are, and how much RAM you have on your machine. If I repeatedly run the example I used below, my R session shows 170MB of memory usage, not a huge amount relative to total memory, and not a huge amount even for 32 bit R. But if your system

Re: [R] Comparing execution times

2011-04-11 Thread Steve Lianoglou
Just a comment about your use of foreach: On Mon, Apr 11, 2011 at 6:29 AM, Alaios ala...@yahoo.com wrote: [snip] C.Case. Foreach is considered to be easier to be applied to manycores. foreach (i=1:dimz) %do% {    print(sprintf('Creating the %d map',i));    Shadowlist[,,i]-f - GaussRF(x=x,

Re: [R] Mclapply and print statement

2011-04-11 Thread Steve Lianoglou
Hi, On Mon, Apr 11, 2011 at 5:26 AM, Alaios ala...@yahoo.com wrote: Dear all. I am using the mclapply function to split my code to the many cores my system has. It seems that is working fine. This is the parallel version of lcapply. The only problem that I seem to have is that the printf

Re: [R] ordered logistic regression - cdplot and polr

2011-04-11 Thread Achim Zeileis
On Mon, 11 Apr 2011, Elizabeth Pringle wrote: Hi, I have a dataset that I am trying to analyze and plot as an ordered logistic regression (y = ordinal categories 1-3, x = continuous variable with values 3-9). First is a problem with cdplot: Produces a beautiful plot, with the right trend, but

Re: [R] ordered logistic regression - cdplot and polr

2011-04-11 Thread Joshua Wiley
Hi Elizabeth, On Mon, Apr 11, 2011 at 9:59 AM, Elizabeth Pringle eprin...@stanford.edu wrote: Hi, I have a dataset that I am trying to analyze and plot as an ordered logistic regression (y = ordinal categories 1-3, x = continuous variable with values 3-9). First is a problem with cdplot:

[R] good examples of plot(table())

2011-04-11 Thread dirknbr
I am looking for good examples of visualising a tabulation using plot(table()) maybe with colour coding or indexing. Dirk -- View this message in context: http://r.789695.n4.nabble.com/good-examples-of-plot-table-tp3442131p3442131.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread dirknbr
I found something here http://www.biostat.umn.edu/~sudiptob/Software/distonearth.R #The following program computes the distance on the surface of the earth between two points point1 and point2. Both the points are of the form (Longitude, Latitude) geodetic.distance - function(point1, point2) {

[R] read in summarised data as table()

2011-04-11 Thread dirknbr
I have some summarised data from a 2D pivot table which I want to visualise in R. How can I read in the data as a R table so I can use mosaicplot()? Dirk -- View this message in context: http://r.789695.n4.nabble.com/read-in-summarised-data-as-table-tp3442283p3442283.html Sent from the R help

Re: [R] Fast version of Fisher's Exact Test

2011-04-11 Thread Steve Lianoglou
Hi, On Fri, Apr 8, 2011 at 1:52 PM, Bert Gunter gunter.ber...@gene.com wrote: 1. I am not an expert on this. Definitely me neither, but: 2. However, my strong prior would be no, since because it is exact it has to calculate all the possible configurations and there are a lot to calculate

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread Seeliger . Curt
I have a bunch of geographic locations specified by lat-long coordinates. What's an easy way to calculate geographic distance between any two points? OR, perhaps there is a function for calculating a distance matrix for K sites? A comparison of some geographic distance calculations is

[R] RExcel

2011-04-11 Thread array chip
Hi, I am installing Excel using package RExcelInstaller. When I tried to run installRExcel() I got this error message: You don not have the R package rcom installed. The (D)COM server installed which will aloow you to use the background server in RExcel. Since rcom is not installed,

Re: [R] read in summarised data as table()

2011-04-11 Thread jim holtman
I assume that you would use 'read.csv' if you are getting output from Excel. Since we have no idea of what you data looks like, it is hard to tell. At least post an example of your data and then what you are expecting as output from the mosaicplot using the data. On Mon, Apr 11, 2011 at 11:20

[R] Question about GAM (mgcv)

2011-04-11 Thread Samuel Turgeon
Dear list, i'm using the GAM function from mgcv package. I'm using this syntax: model=gam(y~offset(x)+s(log1p(x1))+s(log1p(x2))+s(x3)+s(x4)+s(5),family=quasipoisson,data=data) and I'm sequentially dropping the single term with the highest non-significant p-value from the model and re-fitting

[R] Regression model with proportional dependent variable

2011-04-11 Thread ty ty
Hello, dear experts. I don't have much experience in building regression models, so sorry if this is too simple and not very interesting question. Currently I'm working on the model that have to predict proportion of the debt returned by the debtor in some period of time. So the dependent variable

[R] nndist R vs. ArcGIS

2011-04-11 Thread smoluka
Can anyone tell me why I would get different average nearest neighbor values for the same set of coordinates between ArcGIS 10 and R? Sometimes the difference in distance is over 1.3 km. Alexis -- View this message in context:

[R] forest + igraph ?

2011-04-11 Thread Samor Gandhi
Hello, Is it possible to have two meta-plots in one graph (not par(mfrow=c(2,1))? But somthing like  library(metafor)  library(igraph)    if (interactive()) {     forest(dat.Treat$RR, ci.lb=dat.Treat$lower, ci.ub=dat.Treat$upper, xlab=Relative Risk,slab=dat.Treat$ID,refline=1)    

[R] Override col.lines and col.symbol in panel.xyplot with type='b'

2011-04-11 Thread Szumiloski, John
Dear useRs, I have a longitudinal experiment with several treatment groups, ~20 subjects per group, ~6 timepoints and a continuous dependent variable. I have been successfully been using lattice::xyplot with this data. However, I have been stumped with a particular application of it. I

Re: [R] Partial italic in graph titles when looping

2011-04-11 Thread Josh B
Follow-up question: I want to make the gene name bold and italic, AND make the p number just bold. But here's the catch: now I want the p number to appear as a superscript! For instance: TFL1^687 (the carrot is to indicate that I actually want the p number as a superscript). Thanks very

[R] Zoom on simple.violinplot

2011-04-11 Thread PhDGuy
Hello, I am using the function simple.violinplot from the package UsingR. I have some outliers in my dataset so that the distribution has very long tails. As a result, the y-axis of the output of simple.violinplot extends to very large values. I would like to zoom on the y-axis with a command

[R] Problem with facet_grid in ggplot2

2011-04-11 Thread Simon Hayward
Hi all, I am practising a bit with ggplot2 but I have a problem when I try to use facet_grid. The following code:- p - ggplot(diamonds, aes(carat, ..density..)) + + geom_histogram(binwidth = 1) p + facet_grid(cut ~ clarity, margins=TRUE) produce the following error:- Error in

Re: [R] Time series of spatial data

2011-04-11 Thread Oscar Perpiñan Lamigueiro
Hi, You could try spacetime: http://cran.r-project.org/web/packages/spacetime/ Cheers. Oscar. - Oscar Perpiñán Lamigueiro Dpto. de Ingeniería Eléctrica EUITI-UPM http://procomun.wordpress.com --- En Thu, 7 Apr 2011 03:38:12 -0700 (PDT) idham

Re: [R] Adding margin text to lattice graphics

2011-04-11 Thread Oscar Perpiñan Lamigueiro
Hi, You can try the combination of c.trellis and update from the latticeExtra package. For example: p - xyplot(1~1) update(c(p, p, p, p), xlab='SomeText', ylab='MoreText') update(c(p, p, p, p), xlab=c('SomeText', 'SomeText2'), ylab=c('MoreText', 'MoreText2')) There are lots of examples in

[R] Fwd: CRAN problem with plyr-1.4.1

2011-04-11 Thread Ian Davis
It looks like there might be some kind of problem with the Plyr-1.4.1 packages pushed to CRAN? The web pages show 1.4.1 as the current version, but trying to fetch the source through the provided link gives a 404: http://lib.stat.cmu.edu/R/CRAN/web/packages/plyr/index.html $ wget

Re: [R] RExcel

2011-04-11 Thread Jonathan P Daily
It is asking the obvious, but did you run the commands from the rcom package after installation (see inline ***s)? -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room

Re: [R] nndist R vs. ArcGIS

2011-04-11 Thread Seeliger . Curt
Alexis wrote: Can anyone tell me why I would get different average nearest neighbor values for the same set of coordinates between ArcGIS 10 and R? Sometimes the difference in distance is over 1.3 km. spatstat::nndist calculates Euclidean distances rather than distances along the earth's

Re: [R] Fwd: CRAN problem with plyr-1.4.1

2011-04-11 Thread Douglas Bates
The first thing to do is try another mirror. The official (or as official as we ever get about anything) U.S. mirror is http://cran.us.R-project.org They tend to be very good about updating. Presently the source package for plyr is at version 1.5 and the binary versions are both at 1.4.1 On

Re: [R] Polar Plots

2011-04-11 Thread Peter Ehlers
On 2011-04-11 05:38, ogbos okike wrote: Dear List, Following the link below ( http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=plotrix:clock24.plot) I got an interesting polar plots which displayed my data and the time of observation. Thank you very much for providing such details. However, I have

Re: [R] How can I include a new book on the

2011-04-11 Thread Marcio Pupin Mello
It's there. Thank you Ben and also Kurt! Best, Marcio Em 4/7/2011 10:19 AM, Marcio Pupin Mello escreveu: Thanks Ben! I will! Em 4/7/2011 8:32 AM, Ben Bolker escreveu: Marcio Pupin Mellomelloat ieee.org writes: I've just published a new book for R beginners in Portuguese: Conhecendo o R: uma

Re: [R] nndist R vs. ArcGIS

2011-04-11 Thread Barry Rowlingson
On Mon, Apr 11, 2011 at 4:49 PM, smoluka smol...@geo.oregonstate.edu wrote: Can anyone tell me why I would get different average nearest neighbor values for the same set of coordinates between ArcGIS 10 and R? Sometimes the difference in distance is over 1.3 km. Edge correction? In a spatial

[R] Getting many substrings but only loading the original string one time.

2011-04-11 Thread Jonathan
Hi All, I'm looking for a way to get many substrings from a longer string and then stitch them together. But, since the longer string is really, really long (like 250 MB long), I don't want to do this in a loop and load and re-load the longer string many times. Does anybody have an idea?

Re: [R] Getting many substrings but only loading the original string one time.

2011-04-11 Thread Duncan Murdoch
On 11/04/2011 3:48 PM, Jonathan wrote: Hi All, I'm looking for a way to get many substrings from a longer string and then stitch them together. But, since the longer string is really, really long (like 250 MB long), I don't want to do this in a loop and load and re-load the longer string

[R] Plotting a quadratic line on top of an xy scatterplot

2011-04-11 Thread Josh B
Dear Listserv, Here is my latest in a series of simple-seeming questions that dog me. Consider the following data: x - read.table(textConnection(temperature probability 0.11 9.4 0 2.3 0.38 8.7 0.43 9.2 0.6 15.6 0.47 8.7 0.09 12.8 0.11 9.4 0.01 7.7 0.83 8 0.65 9.3 0.05 7.4 0.34 10.1 0.02 4.8

[R] Help on calculating a variable using random numbers

2011-04-11 Thread Shane Phillips
I'm new to R, but I'm trying to write a program for a dissertation that generates a dataset as follows... subject=1:1000 treat=rbinom(1*1000,1,.13) gender=rbinom(1*1000,1,.5) eth=runif(1*1000, min=1, max=4) cogat=rnorm(1*1000, 100, 16) map=rnorm(1*1000, 200, 9) simtest=data.frame

[R] Meta-analysis of a correlation matrix

2011-04-11 Thread Iuri Gavronski
Sorry for the cross-posting, but I would like to know if anyone is aware of a package in R for this. -- Forwarded message -- From: John Antonakis Sent: Sunday, April 10, 2011 3:26 PM To: RMNET Subject: Meta-analysis of a correlation matrix (correct thread title) Hi: Does

Re: [R] Getting many substrings but only loading the original string one time.

2011-04-11 Thread Jonathan
Duncan, That would appear to be exactly what I was looking for! I will follow up if I have trouble after implementing the script this'll be used in. I suppose I'd be wondering whether R is a reasonably fast language to use for this type of task (given the very large long string size, and the

Re: [R] Problem with facet_grid in ggplot2

2011-04-11 Thread Brian Diggs
On 4/11/2011 9:33 AM, Simon Hayward wrote: Hi all, I am practising a bit with ggplot2 but I have a problem when I try to use facet_grid. The following code:- p- ggplot(diamonds, aes(carat, ..density..)) + + geom_histogram(binwidth = 1) p + facet_grid(cut ~ clarity, margins=TRUE) produce the

Re: [R] Meta-analysis of a correlation matrix

2011-04-11 Thread Scott Chamberlain
I don't know if it can, but have you looked into the metafor package? On Monday, April 11, 2011 at 1:46 PM, Iuri Gavronski wrote: Sorry for the cross-posting, but I would like to know if anyone is aware of a package in R for this. -- Forwarded message -- From: John

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread Scott Chamberlain
Thanks very much for the help! Scott On Monday, April 11, 2011 at 12:54 PM, seeliger.c...@epamail.epa.gov wrote: I have a bunch of geographic locations specified by lat-long coordinates. What's an easy way to calculate geographic distance between any two points? OR, perhaps there is a

[R] Speeding up Multinomial Logit/Proportional odds model in R vs stata?

2011-04-11 Thread Tal Galili
Hi all, An R blogger just published a comparison between R and stata for performing: - Multinomial Logit - Proportional odds model - Generalized Logit At: http://ekonometrics.blogspot.com/2011/04/speeding-tickets-for-r-and-stata.html The benchmark used (as mentioned in the comment to

[R] simple maths question

2011-04-11 Thread Georg Ehret
Hi Mrs Ms R, A simple maths question that I am trying to resolve with R: I need to calculate the SE from a pvalue and it's beta... How to do this...? Thank you very much and best regards! Georg Ehret, Geneva, Switzerland. [[alternative HTML version deleted]]

Re: [R] Help on calculating a variable using random numbers

2011-04-11 Thread Dennis Murphy
Hi: Try simtest - transform(simtest, growth = rnorm(1000, m = ifelse(treat == 0, 0.1, 0.5), s = 0.03)) HTH, Dennis On Mon, Apr 11, 2011 at 1:16 PM, Shane Phillips sphill...@lexington1.netwrote: I'm new to R, but I'm trying to write a program for a dissertation that generates a dataset

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread Seeliger . Curt
A comparison of some geographic distance calculations is provided at http://pineda-krch.com/2010/11/23/great-circle-distance-calculations-in-r/ , along with code for calculating the Vincenty inverse formula, which relies on the WGS-84 ellipsoid approximations. You know, Scott, I should

Re: [R] Partial italic in graph titles when looping

2011-04-11 Thread David Winsemius
On Apr 11, 2011, at 6:28 PM, Josh B wrote: Follow-up question: I want to make the gene name bold and italic, AND make the p number just bold. But here's the catch: now I want the p number to appear as a superscript! I am no longer clear (if I ever was) what the p number might be, but

Re: [R] RExcel

2011-04-11 Thread array chip
Yes, I did, and no error message. And comRegisterRegistry() returns NULL, not sure if that matters John From: Jonathan P Daily jda...@usgs.gov Cc: r-help r-help@r-project.org; r-help-boun...@r-project.org Sent: Mon, April 11, 2011 11:39:12 AM Subject: Re:

[R] Revolutions Blog: March Roundup

2011-04-11 Thread David Smith
I write about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are some articles related to R from the month of March: The

Re: [R] nndist R vs. ArcGIS

2011-04-11 Thread Rolf Turner
On 12/04/11 07:32, Barry Rowlingson wrote: On Mon, Apr 11, 2011 at 4:49 PM, smolukasmol...@geo.oregonstate.edu wrote: Can anyone tell me why I would get different average nearest neighbor values for the same set of coordinates between ArcGIS 10 and R? Sometimes the difference in distance is

Re: [R] simple maths question

2011-04-11 Thread Ben Bolker
Georg Ehret georgehret at gmail.com writes: Hi Mrs Ms R, A simple maths question that I am trying to resolve with R: I need to calculate the SE from a pvalue and it's beta... How to do this...? Thank you very much and best regards! Georg Ehret, Geneva, Switzerland. Without more

Re: [R] Plotting a quadratic line on top of an xy scatterplot

2011-04-11 Thread Joshua Wiley
Hi Josh, This is by no means the fanciest solution ever, but as there are predict methods for many types of models in R, I thought I would show it this way. ## fit the model model - lm(probability ~ poly(temperature, 2), data = x) ## create line values dat - data.frame(temperature =

Re: [R] Meta-analysis of a correlation matrix

2011-04-11 Thread Mike Cheung
Dear luri, The metaSEM package (http://courses.nus.edu.sg/course/psycwlm/Internet/metaSEM/) may be used to fit structural equation models on the pooled correlation/covariance matrices with weighted least squares as the estimation method. You may refer to the examples in tssem1() and tssem2().

[R] bind mean to a df

2011-04-11 Thread Geoffrey Smith
Hello, I would like to take the mean of a column from a data frame and then bind the mean back to the data frame. I can do this using the following lines of code, but I am looking for a more elegant solution. Thank you very much. Geoff name -

Re: [R] bind mean to a df

2011-04-11 Thread Joshua Wiley
Hi Geoffrey, Here is one option (data named dfrm instead of data because data() is a function too): ## Data dfrm - data.frame( name = c('Frank','Frank','Frank','Tony','Tony','Tony','Ed','Ed','Ed'), year = c(2004,2005,2006,2004,2005,2006,2004,2005,2006), sale =

Re: [R] bind mean to a df

2011-04-11 Thread baptiste auguie
Hi, You could try, library(plyr) ddply(data, .(name), transform, mean=mean(sale)) ddply(data, .(name), summarize, mean=mean(sale)) HTH, baptiste On 12 April 2011 15:46, Geoffrey Smith g...@asu.edu wrote: Hello, I would like to take the mean of a column from a data frame and then bind the

[R] model specification: help needed

2011-04-11 Thread Ram H. Sharma
Hi R experts: I am new to mixed model commodity. I am tryping to specify a model using lmer in lme4 package. I am not sure if I am doing right, so I need your helpplease.. Treatment / factor structure Year: level 1:3, the whole the experiment was repeated in three years, random

  1   2   >