Re: [R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-24 Thread Philippe Grosjean
Hi JCFaria, You package is supposed to be used only under Windows, right? Then, use: OS_type=windows in the DESCRIPTION file… and, of course, use R CMD check/R CMD build/ R CMD INSTALL under Windows only. Best, Philippe On 23 Sep 2013, at 20:55, Jose Claudio Faria joseclaudio.fa...@gmail.com

Re: [R] time zones from longitude, latitude, and date

2013-09-24 Thread Prof Brian Ripley
On 23/09/2013 22:43, MacQueen, Don wrote: The very first response, from Jeff Newmiller, included a link http://efele.net/maps/tz/world/ which says it has offers a shapefile of timezones of the world. An outline of a solution, then it to download the shapefile load it into R input

Re: [R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-24 Thread Prof Brian Ripley
On 24/09/2013 03:51, Jose Claudio Faria wrote: I think I found the main problem! I am developing the package under Linux and after R CMD build, manually compressing the folder TinnRcom inside of the folder TinnRcom.RCheck and installing in Windows. And how on earth did you expect the helpers

Re: [R] Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?

2013-09-24 Thread E Joffe
Hi David, Thank you for your interest and advice regarding this analysis. I went to double check that the subset process worked properly with the select=c(-time,-status) and I can confirm that it did. Best, Erel -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net]

[R] request for help in R

2013-09-24 Thread atta ahmad
respectd sir,  i am working on regional frequency analysis of flood flow data and want to use packages lmomRFA, lmom, imomco,etc andby using these i want to find RMSE , errorbounds and absolute biase but could not make it clear to use, please help regards atta muhammad asif assistant professor

[R] no answer to the following question

2013-09-24 Thread Michel
I sent this message : Hello everyone, R beginner, I am confronted with the need to use Rmpf. In my first scripts I made use of X=read.table(file.choose(), header=FALSE, sep=,,dec=.)

[R] how to add a box to map plotted by a levelplot?

2013-09-24 Thread Jonsson
conne2 - file(C:\\ome1440s.bin,rb) bioms- readBin(conne2, integer(), size=1, n=1440*720, signed=F) library(raster) library(rasterVis) data(wrld_simpl) library(maptools) ## needed for wrld_simpl r - raster(nrow=720, ncol=1440) r[] - bioms;

Re: [R] how to add a box to map plotted by a levelplot?

2013-09-24 Thread Pascal Oettli
Hello, One way is: levelplot(r, col.regions=myPal) + layer(sp.polygons(wrld_simpl, lwd=0.5)) + layer(panel.rect(2,45,8,51)) Regards, Pascal 2013/9/24 Jonsson amen.alya...@bordeaux.inra.fr conne2 - file(C:\\ome1440s.bin,rb) bioms- readBin(conne2, integer(), size=1, n=1440*720,

Re: [R] Arcsine transformation

2013-09-24 Thread Michael Dewey
At 02:26 23/09/2013, peake wrote: Thanks for the advice. Like I said, I am still pretty new to R, and stats in general. I tried wading through the search results on google, but I didn't really find anything that I could understand. I am working with percentages as my dependent variable, and I am

Re: [R] lattice: double y - problem changing axis color after doubleYScale

2013-09-24 Thread Duncan Mackay
Hi Anna I have never used doubleYScale and I am not sure what you want but try this You need to do this first if columns not correct saves doing later - I forgot to mention it for Week but as you have given the order for the factors do it as well SummPdata[,1] - as.numeric(SummPdata[,1])

[R] R function for censored linear regression

2013-09-24 Thread Andreas Wittmann
Dear R-useRs, I'm looking for an R-function for censored linear regression. I have the following data x1 - rnorm(100) x2 - rnorm(100) y - x1 + 2*x2 + rnorm(100,0,0.5) stat - rep(1,100) stat[50:100] - 0 data - data.frame(y,x1,x2,stat) y is the dependent variable, x1 and x2 are the independent

Re: [R] Rmpfr question

2013-09-24 Thread Martin Maechler
M == Michel michelgo...@free.fr on Fri, 20 Sep 2013 17:56:58 +0200 writes: Hello everyone, R beginner, I am confronted with the need to use Rmpf. why ? In my first scripts I made use of X=read.table(file.choose(), header=FALSE, sep=,,dec=.) X=as.matrix(X) well,

Re: [R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-24 Thread Jose Claudio Faria
Hi, I prefer to build my packages on Linux! I changed the object trPaths as below, After R CMD build TinnRcom on Linux and did the installation on Windows from the source code: It worked very well! I thank all who contributed to the solution and apologize for my lack of knowledge in this area.

[R] Invalid Z argument error in persp.default

2013-09-24 Thread Babak Bastan
I do the folloowing in order to get 3D Plot: y-1:(point/2) x-20:30 z-r[1:(point/2)] persp(x,y,z,theta = 135, phi = 30, col = green3, scale = FALSE, ltheta = -120, shade = 0.75, border = 1) y: [1] 1 2 3 4 5 x: [1] 20 21 22 23 24 25 z: [1] 4811.003.5930256.968666

Re: [R] how to add a box to map plotted by a levelplot?

2013-09-24 Thread Jonsson
That worked fine, thanks. But only worked when the values are positive but when I added negative values, the box was wrong. May be the order I lat and long should be different?any ideas -- View this message in context:

Re: [R] how to add a box to map plotted by a levelplot?

2013-09-24 Thread Jonsson
Thanks.That worked fine.Is there a way to print a number like 1 inside the box plotted? -- View this message in context: http://r.789695.n4.nabble.com/how-to-add-a-box-to-map-plotted-by-a-levelplot-tp4676815p4676825.html Sent from the R help mailing list archive at Nabble.com.

[R] Issue with lmerTest and dopar

2013-09-24 Thread AlexisB
Hi, I have a problem with running a script in parallel with the foreach function for computing linear models at every voxel of a set of 3D images. When I run it using %do%, it runs fine and I get the correct output but when I run it with %dopar% then my main output is not correct. The problem

Re: [R] Invalid Z argument error in persp.default

2013-09-24 Thread Duncan Murdoch
On 13-09-24 6:19 AM, Babak Bastan wrote: I do the folloowing in order to get 3D Plot: y-1:(point/2) x-20:30 z-r[1:(point/2)] persp(x,y,z,theta = 135, phi = 30, col = green3, scale = FALSE, ltheta = -120, shade = 0.75, border = 1) y: [1] 1 2 3 4 5 x: [1] 20 21 22 23 24 25 z: [1]

Re: [R] Rmpfr question; was: no answer to the following question

2013-09-24 Thread Uwe Ligges
On 24.09.2013 10:07, Michel wrote: I sent this message : Hello everyone, R beginner, I am confronted with the need to use Rmpf. It helps to provide a sensible subject line and not to misspell package names:Rmpfr. In

Re: [R] Date Comparing *Problem*

2013-09-24 Thread Uwe Ligges
On 23.09.2013 13:48, Rhymes wrote: I have a problem with comparing dates. i tried it like datesub = subset(data, 2012-11-19 data$date), but this doesn't work and i don't know why. Errr, in R: 2012-11-19 == 1982 You probably want to convert it to a Date object or Posix.. object, but since

[R] GAM GAMM course

2013-09-24 Thread Highland Statistics Ltd
We would like to announce the following statistics course: Beginner's Guide to MCMC, GAM and GAMM When: 10-14 March 2014 Where: Elche, Alicante, Spain For details, see: http://www.highstat.com/statscourse.htm Course flyer: http://www.highstat.com/Courses/Flyer2014_3ElcheV2.pdf Kind regards,

[R] Graph is without line

2013-09-24 Thread mohan . radhakrishnan
Hi, Sometimes I get a graph like the attached one. The data type could have something to do with it. This graph does not use the color and does not draw a line. Earlier I used to convert the factors in the data frame to another data type and drew the correct graphs. Any idea why this

Re: [R] Graph is without line

2013-09-24 Thread arun
Try: plot(as.numeric(data$Var1),data$Freq,ylim=c(0,700),col=green,type=o,ylab=,xlab=,las=2,lwd=2.5,xaxt=n) A.K. - Original Message - From: mohan.radhakrish...@polarisft.com mohan.radhakrish...@polarisft.com To: r-help@r-project.org Cc: Sent: Tuesday, September 24, 2013 8:46 AM

Re: [R] lattice: double y - problem changing axis color after doubleYScale

2013-09-24 Thread Duncan Mackay
Hi Anna Have a look a ylab in my script - you will need to modify the label I was going from memory on the exact label argument name . I think it is text = Np or whatever you want. The strip arguments are controlled by useOuterStrip see ?useOuterStrip So you will need to modify as a custom

[R] Help: calculations based on three matrices

2013-09-24 Thread JiangZhengyu
Dear R experts, I have 3 matrices - Mx, My and geno that have the same exact dimensions (attached). I want to calculate a expression matrix (ME) of the same dimension as well. It is a little complicated. To calculate and for a specific cell in ME, e.g. ME[2,2], if value of

[R] Hungarian R User's Group: Exploratory and interactive data analysis talks on Wednesday

2013-09-24 Thread Gergely Daróczi
Dear useRs, although we have just (around a month ago) founded the Budapest Users of R Network, I am more than happy to announce that 75 members already joined and we are very close to take part in the first official meeting. We will meet at the ELTE University, Budapest, Hungary at 18:00 (CET)

Re: [R] no answer to the following question

2013-09-24 Thread Bert Gunter
You might be more successful if: 1. Post in plain text, not HTML, as the posting guide asks; 2. Don't post at all. Instead read the included tutorial, An Introduction to R, or one of the many on the web that you might prefer. Nothing wrong with being a newbie; but (imo, of course) there **is**

Re: [R] Matrix operation

2013-09-24 Thread arun
Hi, Try: set.seed(49) qcd- matrix(sample(1:20,124*69,replace=TRUE),ncol=69) set.seed(345) listt- matrix(sample(1:80,124*5,replace=TRUE),ncol=5) lst1-list(c(15,2),c(56,54),c(15,62),c(4,14))  names(lst1)- 2:5 S- do.call(cbind,lapply(names(lst1),function(i)

Re: [R] Help: calculations based on three matrices

2013-09-24 Thread arun
Hi, Try: ME- matrix(NA,dim(geno[1]),dim(geno)[2]) indx0- geno==0 !is.na(geno) ME[indx0]- Mx[indx0]+My[indx0]  indx1- geno==1 !is.na(geno) ME[indx1]- apply(cbind(Mx[indx1],My[indx1]),1,max) ME A.K. - Original Message - From: JiangZhengyu zhyjiang2...@hotmail.com To:

Re: [R] Help: calculations based on three matrices

2013-09-24 Thread Berend Hasselman
On 24-09-2013, at 16:51, arun smartpink...@yahoo.com wrote: Hi, Try: ME- matrix(NA,dim(geno[1]),dim(geno)[2]) indx0- geno==0 !is.na(geno) ME[indx0]- Mx[indx0]+My[indx0] indx1- geno==1 !is.na(geno) ME[indx1]- apply(cbind(Mx[indx1],My[indx1]),1,max) I would do this to avoid the apply

Re: [R] [] and escaping in regular expressions

2013-09-24 Thread Bert Gunter
Time to spend some time with the docs! ?egexp tells you: . (Only ^ - \ ] are special inside character classes.) See also inline below. Cheers, Bert On Tue, Sep 24, 2013 at 8:30 AM, Juliet Hannah juliet.han...@gmail.comwrote: Is it correct that one does not need to escape special

[R] [] and escaping in regular expressions

2013-09-24 Thread Juliet Hannah
Is it correct that one does not need to escape special characters such as * (are these properly called metacharacters) inside []. If so, what is the logic to this? mytest - he*llo sub([*],,mytest) sub(\\*,,mytest) [] is easier to read for me than \\. Is this what people tend to use? Thanks.

Re: [R] [] and escaping in regular expressions

2013-09-24 Thread Ista Zahn
On Tue, Sep 24, 2013 at 11:40 AM, Bert Gunter gunter.ber...@gene.com wrote: Time to spend some time with the docs! ?egexp Just to avoid any confusion: the documentation topic is ?regexp, not ?egexp tells you: . (Only ^ - \ ] are special inside character classes.) See also inline below.

Re: [R] adjust scale of x-axis to unequal intervals

2013-09-24 Thread Sagan Friant
Thank you! This worked beautifully. Can you help me adapt the code to do the same thing for a plot of means? The application is not a simple as I hoped... plotMeans(rich.small$ALL, rich.small$sample, error.bars=se) On Mon, Sep 23, 2013 at 10:41 PM, Jim Lemon j...@bitwrit.com.au wrote: On

Re: [R] Installing R, R packages

2013-09-24 Thread David Winsemius
On Sep 24, 2013, at 12:47 AM, Jeff Newmiller wrote: I have stopped using the Berkeley mirror, and just automatically use UCLA due to missing packages. However, I feel no compulsion to extrapolate and say that there is some sort of corruption going on at CRAN mirrors because it is only one

Re: [R] Installing R, R packages

2013-09-24 Thread Simon Zehnder
Had yesterday something pretty similar on the 73 installing benchmark: Error in untar2(tarfile, files, list, exdir, restore_times) : incomplete block on file The downloaded source packages are in ‘/private/var/folders/n9/zxfxcd01557dc06bf3c1njy0gn/T/RtmpkwQyuQ/downloaded_packages’

[R] Checking a large data set for normality

2013-09-24 Thread steric
Hello, I have a large data set that includes many soil parameters (i.e. pH, calcium levels, enzyme activity, etc) Does anyone have any input as to the easiest way to check a large data set for normality? Is there an R function/package that can do this all at once? Thank you in advance, --

Re: [R] [] and escaping in regular expressions

2013-09-24 Thread Bert Gunter
Ah... Thanks, Ista. Missed that typo. -- Bert On Tue, Sep 24, 2013 at 8:48 AM, Ista Zahn istaz...@gmail.com wrote: On Tue, Sep 24, 2013 at 11:40 AM, Bert Gunter gunter.ber...@gene.com wrote: Time to spend some time with the docs! ?egexp Just to avoid any confusion: the documentation

Re: [R] Checking a large data set for normality

2013-09-24 Thread Simon Zehnder
Check the Jarque-Bera Test for univariate testing (http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/tseries/html/jarque.bera.test.html) and Mardia's test for multivariate testing (http://www.inside-r.org/packages/cran/MVN/docs/mardia.test). On Sep 24, 2013, at 6:44 PM, steric

[R] display recursive partitioning tree as a treemap?

2013-09-24 Thread Michael Friendly
The rpart and party packages, among others, calculate recursive partitioning trees for regression and classification. There are plot methods available for showing various features as, well, trees. But trees can be displayed more compactly as treemaps, eg with the treemap packge, giving a

[R] TwitteR package

2013-09-24 Thread Bingham-Hall, John
Hi all, I am a beginner in R attempting to use TwitteR package to query lists of Twitter followers for several users. I successfully have set nx as an object assigned with the screenName I want to query but when I use the method nx$getFollowerIDs(n=NULL) it returns a list of users from my own

[R] plot - scaling axis

2013-09-24 Thread Hermann Norpois
Hello, i attached an example with two plotted vectors, respectively. And you might see that the y and x axis are not the same scale (e.g. the third and the last plot). I would prefer them to be the same scale. A toy example: a - c (1,2,3,4,5,6,9,20) b - c (0.2,0.4,0.6,1,0.5,1,1,0.1) plot

Re: [R] plot - scaling axis

2013-09-24 Thread William Dunlap
Use asp=1 in the plot command. E.g., par(mar=c(3,1,1,1), fig=c(0,1,.5,1)) ; plot(1:10, 1:10, asp=1) par(new=TRUE, fig=c(0,.3,0,.5)) ; plot(1:10, 1:10, asp=1) par(new=TRUE, fig=c(0.3,1,0,.5)) ; plot(1:10, 1:10, asp=1) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original

Re: [R] plot - scaling axis

2013-09-24 Thread Jim Lemon
On 09/25/2013 03:25 AM, Hermann Norpois wrote: Hello, i attached an example with two plotted vectors, respectively. And you might see that the y and x axis are not the same scale (e.g. the third and the last plot). I would prefer them to be the same scale. A toy example: a- c

[R] Confusing behaviour in data.table: unexpectedly changing variable

2013-09-24 Thread Jonathan Dushoff
I got bitten badly when a variable I created for the purpose of recording an old set of names changed when I didn't think I was going near it. I'm not sure if this is a desired behaviour, or documented, or warned about. I read the data.table intro and the FAQ, and also ?setnames. Ben Bolker

Re: [R] Graph is without line

2013-09-24 Thread Jim Lemon
On 09/24/2013 10:46 PM, mohan.radhakrish...@polarisft.com wrote: Hi, Sometimes I get a graph like the attached one. The data type could have something to do with it. This graph does not use the color and does not draw a line. Earlier I used to convert the factors in the data frame to

Re: [R] how to add a box to map plotted by a levelplot?

2013-09-24 Thread Pascal Oettli
Hello, ?panel.text ?grid.text Regards, Pascal 2013/9/24 Jonsson amen.alya...@bordeaux.inra.fr Thanks.That worked fine.Is there a way to print a number like 1 inside the box plotted? -- View this message in context:

Re: [R] adjust scale of x-axis to unequal intervals

2013-09-24 Thread Jim Lemon
On 09/25/2013 01:56 AM, Sagan Friant wrote: Thank you! This worked beautifully. Can you help me adapt the code to do the same thing for a plot of means? The application is not a simple as I hoped... plotMeans(rich.small$ALL, rich.small$sample, error.bars=se) ... Hi Sagan, Let's see,

[R] object not found in a cca analysis with vegan package

2013-09-24 Thread Pierre Paradis
I'm a beginner, trying to do a canonical correspondance analysis with the vegan package, but I come up with that : library(vegan) abondance.txt - read.table(C:/Users/abondance.txt,header=T,sep=\t) abondance - cca(abondance[,-c(1,2)]~altitude, data=abondance, nhea) Error in model.frame(data

[R] fit a time varying coefficient log linear model in r

2013-09-24 Thread shanxiao
Hello, all, Does anyone know any package in r to fit a log linear model with time varying coefficients in R? I have googled but with no results. Your help will be appreciated. J Shan Xiao Ph.D. student of Biostatistics, Department of Biostatistics, IUPUI. [[alternative

Re: [R] failure to replayPlot() a recordedplot object saved in a previous session?

2013-09-24 Thread Paul Murrell
Hi Attempting to use a display list snapshot (as created by recordPlot()) between R sessions has always been strongly discouraged, but as of about R 3.0.0 it has become impossible (due to internal changes, which was part of the reason for strongly discouraging this in the first place).

Re: [R] object not found in a cca analysis with vegan package

2013-09-24 Thread Pascal Oettli
Hello, It is kindly requested to post in plain text. HTML is prohibited. Your data are stored in abondance.txt, not in abondance. Hope this helps, Pascal 2013/9/25 Pierre Paradis exod...@hotmail.com I'm a beginner, trying to do a canonical correspondance analysis with the vegan package,

Re: [R] Checking a large data set for normality

2013-09-24 Thread David Winsemius
On Sep 24, 2013, at 11:44 AM, steric wrote: Hello, I have a large data set that includes many soil parameters (i.e. pH, calcium levels, enzyme activity, etc) Does anyone have any input as to the easiest way to check a large data set for normality? Is there an R function/ package that

Re: [R] Graph is without line

2013-09-24 Thread mohan . radhakrishnan
Hi, Yes. It worked. Is 'stringAsFactors=FALSE' the switch to use when reading data into a frame ? All the values I use are either numbers or dates or strings. Sometimes while I manipulate the data by filtering, the values seem to become factors ? Thanks, Mohan From: Jim Lemon

Re: [R] fit a time varying coefficient log linear model in r

2013-09-24 Thread David Winsemius
On Sep 24, 2013, at 3:33 PM, shanxiao wrote: Hello, all, Does anyone know any package in r to fit a log linear model with time varying coefficients in R? I have googled but with no results. Your help will be appreciated. J Perhaps glm (in the default stats package) with an offset of