Re: [R] R programming question

2015-09-03 Thread Thierry Onkelinx
Have a look at ?outer outer(1:10, 10:1) Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician

[R] Unable to display titles in final merged SPSS output file - when merged the two SPSS data sets in R

2015-09-03 Thread jagadishpchary
I have two large data sets in SPSS which I am trying to merge the files using R - (for test purpose I included only two variables with 4 cases) and below is the R syntax that I am using for merging the files. data <- read.spss("D:/R_merge/Data.sav") data1 <- read.spss("D:/R_merge/Data1.sav")

[R] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 10

2015-09-03 Thread Joyaa Antares
Hello r-help, I am quite new to R. I downloaded R 3.2.2 for Windows to use with Windows 10. On attempting to load the RcmdrPlugin.survival plug-in I got this error message: Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : [tcl] invalid command name "configure".

Re: [R] Urgent query

2015-09-03 Thread Bert Gunter
1. Always reply to the list, not just to 1 person. 2. I don't do private consulting. 3. Read the posting guide linked below for how to properly post code. Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford

Re: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 10

2015-09-03 Thread Fox, John
Dear Joyaa, I too run R 3.2.2 on a Windows 10 system. I uninstalled R, deleted my package library, and then reinstalled R and the Rcmdr and RcmdrPlugin.survival packages. I took all defaults, except that I selected the SDI rather than the default MDI for Rgui, but I seriously doubt that this

[R] R programming question

2015-09-03 Thread Oleg Portnoy
I have two vectors of probability distribution of the same length n for random variable X and Y. I want to built matrix of two-dimension distribution for X and Y with assumption of independence. P(X=i,Y=j)=P(X=i)*P(Y=j) I want to do this very fast for n=120 and big amount of different distribution

[R] How to use dwish in MCMCpack in R

2015-09-03 Thread Anamika Chaudhuri
Hi All: I am trying to use the dwish function in the MCMCpack in R dwish(W, v, S) where Arguments W-Positive definite matrix W v-Degrees of freedom (scalar). S-Inverse scale matrix How do I determine W, the positive definite matrix. The matrix provided in the documentation doesnot help.

[R] Revolutions blog: August 2015 roundup

2015-09-03 Thread David Smith
Since 2008, Revolution Analytics (and now Microsoft) staff and guests have written 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

Re: [R] urgent question about Lmer models

2015-09-03 Thread Bert Gunter
You need to consult a local statistical expert or post on a statistics list like stats.stackexchange.com . This is a statistical question not an R question. The answer is: Because the design is balanced and the treatment error is obtained from the (within site) rsd, but you will probably need

Re: [R] How to use dwish in MCMCpack in R

2015-09-03 Thread Anamika Chaudhuri
I put in the matrix at which I want the density as S. I was wondering what is W then? Thanks Anamika On Thu, Sep 3, 2015 at 12:28 PM, Duncan Murdoch wrote: > On 03/09/2015 9:29 AM, Anamika Chaudhuri wrote: > > Hi All: > > > > I am trying to use the dwish function in

Re: [R] Urgent query

2015-09-03 Thread Bert Gunter
You still failed to post to the list! Please learn how to use your mail client properly and **always** cc the list. Anyway, here is an answer (there may be other ways): > curve(dweibull(x,shape=0.8,scale=1),mgp=c(2,0.3,0),cex.lab=1.2,xlab="t",ylab="f(t)") >

Re: [R] How to use dwish in MCMCpack in R

2015-09-03 Thread Duncan Murdoch
On 03/09/2015 9:29 AM, Anamika Chaudhuri wrote: > Hi All: > > I am trying to use the dwish function in the MCMCpack in R > > dwish(W, v, S) where > > Arguments > W-Positive definite matrix W > v-Degrees of freedom (scalar). > S-Inverse scale matrix > > How do I determine W, the positive

Re: [R] How to use dwish in MCMCpack in R

2015-09-03 Thread Duncan Murdoch
On 03/09/2015 12:41 PM, Anamika Chaudhuri wrote: > I put in the matrix at which I want the density as S. I was wondering > what is W then? You need to read the help page. The matrix at which you want the density is W. S is a parameter of the distribution. Duncan Murdoch > > Thanks > Anamika

[R] urgent question about Lmer models

2015-09-03 Thread Aline Andrey
Dear r-help, I have a question about the std error of a lmer model with library (LmerTest). I have 12 sites with 6 treatments over each site. I measured some response variable (biomass_of_insects) (with a gaussian distribution). I did : library (LmerTest) model<- lmer((biomass_of_insects) ~

Re: [R] urgent question about Lmer models

2015-09-03 Thread Ben Bolker
Bert Gunter gmail.com> writes: > > You need to consult a local statistical expert or post on a statistics > list like stats.stackexchange.com . This is a statistical question > not an R question. > > The answer is: Because the design is balanced and the treatment error > is obtained from the

[R] R on Windows 10

2015-09-03 Thread Martinez, Stephen Anthony - marti3sa
Please forgive me if this is the wrong place to ask or if I missed somewhere that it mentions this but I just wanted to make sure, does the most recent version of R work on windows 10? I know under the FAQ it says XP or newer but just wanted to confirm since windows 10 is new. Thank you!

Re: [R] Extracting column value from csv file according to if else and & operator

2015-09-03 Thread shawin
I should extract the value according to the condition above On Thu, Sep 3, 2015 at 7:57 AM, Navien [via R] < ml-node+s789695n4711782...@n4.nabble.com> wrote: > Hi all > I have a csv file and i would like to extract the value of it with > specific range fof the last column for example; F>2 & F<2

Re: [R] Extracting XML value

2015-09-03 Thread Ben Tupper
Hi, You are very close and your understanding is correct - you need to extract the root node from the XMLDocument returned from xmlTreeParse. library(XML) txt <- "\n\n \n\n\n\n\n" # parse the text tree and extract the root node obs <- xmlRoot(xmlTreeParse(txt, useInternalNodes = TRUE,

Re: [R] ggplot2 will not install after system upgrade

2015-09-03 Thread Ista Zahn
Hi Jeff, Your chances of getting a useful response will increase if you provide some additional information. For example, which version of R? Which version of ggplot2? What sequence of commands produces the error? What _exactly_ does the error message say? Does update.packages(ask=FALSE,

[R] optimx parameter scale warning

2015-09-03 Thread Will Hopper
Hi all, I'm using optimx (version 2013.8.7) to perform parameter estimation with the nelder-mead method, and received a warning that the parameters are on different scales, which can hurt optimization performance on derivative free methods. This warning is accurate as some parameters are small

Re: [R] R on Windows 10

2015-09-03 Thread Jeff Newmiller
Apparently yes. Just this morning John Fox said he was using R 3.2.2 on Windows 10. To be fair, he was responding to someone who was having trouble, but as typical there were no details. The posting guide does recommend searching the archives before posting.

Re: [R] registerDoParallel and R CMD check --as-cran errors

2015-09-03 Thread Witold E Wolski
To answer my own question. Dono if it's the right way to do... In the example code I am using a single CPU and it works. regards PS. Should I have asked this question on the devel list? On 2 September 2015 at 14:39, Witold E Wolski wrote: > I am testing a package with >

Re: [R] R on Windows 10

2015-09-03 Thread Fox, John
Dear Jeff and Stephen, I can confirm that I'm using R 3.2.2 (and R-devel) on two Windows 10 systems with no problems whatsoever. As well, although I can't be sure, I doubt that the problem reported earlier today (concerning the RcmdrPlugin.survival package) was related to use of Windows 10. I

Re: [R] Converting CSV file to numeric and calculate ttest

2015-09-03 Thread shawin
dear Pikal , did you receive my last mail ? On Thu, Sep 3, 2015 at 8:11 AM, PIKAL Petr [via R] < ml-node+s789695n471178...@n4.nabble.com> wrote: > Hi > > p value of what? How do you know that it should be 0.3? > > Your HTML post is mangled and almost unreadable. > > Your code is not

[R] ggplot2 will not install after system upgrade

2015-09-03 Thread Jeff Trefftzs
I just upgraded my laptop from Fedora Core 20 to Fedora Core 22, and after the upgrade R can no longer use the ggplot2 library. The principal complaint seems to be that libicui18n.so.50 is not found. The version of libicu that is installed is version 54. On the other hand, the same environment

Re: [R] Converting CSV file to numeric and calculate ttest

2015-09-03 Thread shawin
Oh sorry F<2 & F<-2 , i need to extract the row value according to the last two column F,P and using condition , I attached an test file to see the data On Thu, Sep 3, 2015 at 8:43 AM, PIKAL Petr [via R] < ml-node+s789695n4711787...@n4.nabble.com> wrote: > Hi > > what is F? > > F>2 & F<2 >

Re: [R] ggplot2 will not install after system upgrade

2015-09-03 Thread Marc Schwartz
> On Sep 3, 2015, at 2:03 PM, Jeff Trefftzs wrote: > > I just upgraded my laptop from Fedora Core 20 to Fedora Core 22, and > after the upgrade R can no longer use the ggplot2 library. The > principal complaint seems to be that libicui18n.so.50 is not found. The > version of

Re: [R] Converting CSV file to numeric and calculate ttest

2015-09-03 Thread PIKAL Petr
Hi what is F? F>2 & F<2 this is FALSE for all values of F What value you want to extract? All rows corresponding to condition or just values from specific column. For selection values you can use e.g. [ data(iris) sel<-iris$Sepal.Width>4 iris[sel,] or iris[sel, c(1,3,5)] Cheers Petr From:

Re: [R] Converting CSV file to numeric and calculate ttest

2015-09-03 Thread PIKAL Petr
Hi p value of what? How do you know that it should be 0.3? Your HTML post is mangled and almost unreadable. Your code is not reproducible, we do not have AT1.csv AT1 shall be numeric so your reading process is wrong and following conversion to numeric shall be umnnecessary if you read your

Re: [R] spatial estimation

2015-09-03 Thread Roger Bivand
fabrizio renzi gmail.com> writes: > > I am using spdep package to do spatial estimations in R. > > Anyway I was not able to find out how to compute the loglikelihood (and a > pseudo-R^2) of a 2sls spatial model, estimated through the command stsls. I > need some fitting indicator to compare

[R] merge xts objects with different data types ?

2015-09-03 Thread ce
Hello Let's say some questions about merging xts variables : a<- xts("abc", Sys.Date()) b <- xts("def", Sys.Date()) c <- xts(1, Sys.Date()) > merge(a,b) a b 2015-09-03 "abc" "def" > merge(a,b,c) a b c 2015-09-03 NA NA 1 Warning messages: 1: In merge.xts(a, b,

Re: [R] R on Windows 10

2015-09-03 Thread Miloš Žarković
R, Rstudio and Rcommander work on windows 10 without problems On 3 Sep 2015 22:11, "Martinez, Stephen Anthony - marti3sa" < marti...@dukes.jmu.edu> wrote: > Please forgive me if this is the wrong place to ask or if I missed > somewhere that it mentions this but I just wanted to make sure, does

[R] Extracting XML value

2015-09-03 Thread Glenn Schultz
All, I have made it as far as generating an api call which returns the following xml [1] "\n\n  \n\n\n\n\n" attr(,"Content-Type")               charset  "text/xml"    "UTF-8"  following DTL's presentation on the Berkley site and the package help I parsed the xml doc = xmlTreeParse(USSW10,

Re: [R] Converting CSV file to numeric and calculate ttest

2015-09-03 Thread shawin
Dear Petr, This code does not work ? For selection values you can use e.g. [ data(iris) sel<-iris$Sepal.Width>4 iris[sel,] or iris[sel, c(1,3,5)] the data is csv file which is : FCPval <- read.csv("C:/Users/shawin/Desktop/RProgramms/RAdipose/FCPval.csv") ; Fc2<-(FCPVal$Fc>=2 | FCPval<=-2);

[R] file.show cleanup

2015-09-03 Thread Dan D
The file.show() function seems to be exactly what I'm needing for displaying file contents for users, but I need something like "file.close()" to close the "R Information" window to clean up afterwards. Does anyone know if there is such a thing? -Dan -- View this message in context:

Re: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 10

2015-09-03 Thread Fox, John
Dear Joyaa, > -Original Message- > From: Joyaa Antares [mailto:jo...@goldcoastosteopathy.com.au] > Sent: September 3, 2015 9:37 PM > To: Fox, John > Cc: r-help@r-project.org > Subject: Re: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows > 10 > > Dear

Re: [R] ggplot2 will not install after system upgrade

2015-09-03 Thread Jeff Trefftzs
On Thu, 2015-09-03 at 16:47 -0400, Ista Zahn wrote: > Hi Jeff, > Your chances of getting a useful response will increase if you > provide > some additional information. For example, which version of R? Which > version of ggplot2? Sorry. R was version 3.2.1 ggplot2 1.0.1 > What sequence of

[R] Pairwise comparisons, adonis (Vegan)

2015-09-03 Thread Hazel Knipe
Hello all, I am an undergraduate, so bare with me if I don't make complete sense! I have performed a permanova using the function Adonis (vegan), to test for significant difference in OTU datasets from different species (n=5) at different sites (n=6) with a total of 20 libraries

[R] edit GUI preferences for current session?

2015-09-03 Thread Dan D
I'd like to edit the GUI preferences for the current (Windows) session via command line rather than the Edit|GUI preferences menu. In particular, is there a way to change the pagerstyle to singlewindow without using the menu or editing the RConsole file? Any ideas? Thanks! -Dan -- View this

Re: [R] merge xts objects with different data types ?

2015-09-03 Thread Jeff Newmiller
The root of your problems lie in your assumption that xts variables act like data frames. Instead they are matrices with an index attribute. All values in a matrix must be of the same storage mode. You might want to investigate the data.table package. It is not a time series object but you

[R] How to get filter probabilities from msmFit() of package MSwM?

2015-09-03 Thread 王柏元
Dear all: I am a rookie in using R. I have a question: How to get filter probabilities from msmFit() of package MSwM? following are my code #Markov Switch Model library(MSwM) data(example) mod<-lm(y~1,example) mod.msm<-msmFit(mod,k=2,sw=c(T,T)) summary(mod.msm)

Re: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 10

2015-09-03 Thread Joyaa Antares
Dear John, Dear List, Thank you for responding. Like you, I have tried uninstalling R and reinstalling again. Question 1: having uninstalled R, how do you delete the package library? I have used defaults throughout the process, except for running the whole things as Administrator rather

[R] 回覆﹕ How to get filter probabilities from msmFit() of package MSwM?

2015-09-03 Thread 王柏元
By using plotProb(mod.msm,which=2), I could only show the graph of smoothed probabilities. May I extract smoothed probabilities and filter probabilities from the msmFit()? thank you very much. 15/9/4 (五),王柏元 寫道: 主旨: [R] How

Re: [R] merge xts objects with different data types ?

2015-09-03 Thread Joshua Ulrich
On Thu, Sep 3, 2015 at 7:40 PM, ce wrote: > > Hello > > Let's say some questions about merging xts variables : > > a<- xts("abc", Sys.Date()) > b <- xts("def", Sys.Date()) > c <- xts(1, Sys.Date()) > >> merge(a,b) >a b > 2015-09-03 "abc" "def" >> merge(a,b,c)

Re: [R] merge xts objects with different data types ?

2015-09-03 Thread ce
Thanks a lot Jeff and Joshua, I can see why data.table can be used with dates ( still more work to make it work :) ) For factors, I was hoping to get a time series of a factor ( values can be only "abc" or "def" category ) : 2015-09-04 "abc" 2015-09-05 "abc" 2015-09-06 "def" 2015-09-07 "abc"