Re: [R] double if else

2015-02-22 Thread Thierry Onkelinx
Dear Daisy, You are making things too complicated. There is no need for a loop and a nested if structure. areaKM <- 7500 dat <- data.frame( x = 1:30, y = 31:60, cellvalue = c(5, 6 , 7, rep(10, 10), rep(20, 17)) )#fake if(areaKM > 15000){ treshold <- 30 } else { treshold <- 5 } n.cells

Re: [R] double if else

2015-02-22 Thread Daisy Englert Duursma
The corrected version is below. I found an error. areaKM<-7500 #test for 7500 and 3 dat<-data.frame(x=1:30,y=31:60,cellvalue=c(5,6,7,rep(10,10),rep(20,17)))#fake data cells<-unique(as.numeric(dat$cellvalue))#find unique cellvalues pres100km <- list() #empty list for (ii in 1:length(cells)){

[R] double if else

2015-02-22 Thread Daisy Englert Duursma
Hello, I need to make a double clause in an if else/ next statement. I wrote a single one fine but I could not make it work for two statements statements. Please see the following example: #Goals #1)if size of area is greater than 15000 test that there are a minimum of nrow() = 30, #write

Re: [R] Simultaneous Probit-Tobit

2015-02-22 Thread David Winsemius
On Feb 22, 2015, at 3:17 PM, Christopher Shultz wrote: > Hi: > > > > > I am trying to write code to run a simultaneous probit-tobit > model (Chappell, 1982) in order to quantify the determinants of > legislator voting behavior. I can't seem to find any background on this. > I have worked w

Re: [R] glm.fit when family argument is not a "family" object

2015-02-22 Thread Bert Gunter
Exactly. Just a matter of fixing the glm.fit Help page. -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." Clifford Stoll On Sun, Feb 22, 2015 at 3:11 PM, David Winsemius wrot

[R] Simultaneous Probit-Tobit

2015-02-22 Thread Christopher Shultz
Hi: I am trying to write code to run a simultaneous probit-tobit model (Chappell, 1982) in order to quantify the determinants of legislator voting behavior. I can't seem to find any background on this. I have worked with code for simple logit and probit models, but this is a di

Re: [R] glm.fit when family argument is not a "family" object

2015-02-22 Thread David Winsemius
On Feb 22, 2015, at 1:55 PM, Mathew McLean wrote: > The documentation for glm/glm.fit indicates that the family argument "can > be a character string naming a family function, a family function or the > result of a call to a family function". > > glm.fit(1, 1, family = "gaussian") > > ## Error:

Re: [R] glm.fit when family argument is not a "family" object

2015-02-22 Thread Bert Gunter
... But glm(1~1, family = gaussian) ## works. As does family = "gaussian" (R 3.1.2 ) Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." Clifford Stoll On Sun, Feb 22, 2

[R] glm.fit when family argument is not a "family" object

2015-02-22 Thread Mathew McLean
The documentation for glm/glm.fit indicates that the family argument "can be a character string naming a family function, a family function or the result of a call to a family function". glm.fit(1, 1, family = "gaussian") ## Error: $ operator is invalid for atomic vectors glm.fit(1, 1, family =

Re: [R] Running command had status 1 in R

2015-02-22 Thread Prof Brian Ripley
On 22/02/2015 15:46, Ben Bolker wrote: Fatemeh a gmail.com> writes: Hi all, I am running a software which is shinybased within R : it gives me this error: Warning: running command 'octave -qf octave/muxMultisliceCommunity.m' had status 1 I was wondering if anyone could help me where the pr

Re: [R] groupedData FUNCTION

2015-02-22 Thread Rui Barradas
Hello, You are using a function in package nlme. You must first load the package in your R session with the following instruction. library(nlme) Hope this helps, Rui Barradas Em 22-02-2015 20:23, CHIRIBOGA Xavier escreveu: Dear colleagues, I am trying to use the function "groupedData".

[R] groupedData FUNCTION

2015-02-22 Thread CHIRIBOGA Xavier
Dear colleagues, I am trying to use the function "groupedData". However, I got this message: results<-groupedData(Abundance~Timepoint|Repli,outer=~Soil,data=dat1) Error: could not find function "groupedData" I am puttin g all my willingness to learn R but this is really desesperating. O

Re: [R] HELP asin transformation

2015-02-22 Thread Ben Bolker
CHIRIBOGA Xavier unine.ch> writes: > > Dear all, > > I attempted to transform my data using "asin" but a WARNING message appears: > > dat1$Abu.tr<-asin(sqrt(dat1$Abundance/100)) > Warning message: > In asin(sqrt(dat1$Abundance/100)) : NaNs produced > > What does it mean? Is it a problem? How

Re: [R] RMySQL Installation Error

2015-02-22 Thread avinash barnwal
Dear Prof Brian, Thank you for telling the solution and from next time i will follow the posting guide. On Sun, Feb 22, 2015 at 11:51 PM, Prof Brian Ripley wrote: > On 22/02/2015 17:07, avinash barnwal wrote: > >> Hi List, >> >> I am trying to install RMySQL on Windows 7(64 Bit) with R Version

Re: [R] HELP asin transformation

2015-02-22 Thread Jeff Newmiller
This is a math question, not an R question. You cannot give numbers to asin that are less than -1 or greater than 1 and get a defined answer. --- Jeff NewmillerThe . . Go Live... DCN:

Re: [R] Issue wit Package installation and download.file()

2015-02-22 Thread Jeff Newmiller
This sounds like you should read FAQ 2.19. Next time you post, please read the Posting Guide first. In particular, please use plain text since your HTML-formatted email was messed up on the mailing list. --- Jeff Newmiller

[R] HELP asin transformation

2015-02-22 Thread CHIRIBOGA Xavier
Dear all, I attempted to transform my data using "asin" but a WARNING message appears: dat1$Abu.tr<-asin(sqrt(dat1$Abundance/100)) Warning message: In asin(sqrt(dat1$Abundance/100)) : NaNs produced What does it mean? Is it a problem? How can I solve this? Thank you! XAVIER _

Re: [R] RMySQL Installation Error

2015-02-22 Thread Prof Brian Ripley
On 22/02/2015 17:07, avinash barnwal wrote: Hi List, I am trying to install RMySQL on Windows 7(64 Bit) with R Version 2.15.1 on RStudio. I have also followed the steps mentioned on the different web sources and finally drilled down to following steps: Hmm, those are not the correct instructio

[R] RMySQL Installation Error

2015-02-22 Thread avinash barnwal
Hi List, I am trying to install RMySQL on Windows 7(64 Bit) with R Version 2.15.1 on RStudio. I have also followed the steps mentioned on the different web sources and finally drilled down to following steps: 1. *Installed MySQL to "C:\Program Files (x86)\MySQL\MySQL Server 5.6”* 2. * Add

Re: [R] Correlation question

2015-02-22 Thread David L Carlson
As Kehl pointed out, any linear function of the independent variable (speed) will have the same squared correlation with the dependent variable (dist), but only one linear function minimizes the squared deviations between the fitted values and the original values. The equation you are using is o

Re: [R] Running command had status 1 in R

2015-02-22 Thread Ben Bolker
Fatemeh a gmail.com> writes: > > Hi all, > > I am running a software which is shinybased within R : it gives me this > error: > > Warning: running command 'octave -qf octave/muxMultisliceCommunity.m' > had status 1 > > I was wondering if anyone could help me where the problem is and what is >

[R] Running command had status 1 in R

2015-02-22 Thread Fatemeh a
Hi all, I am running a software which is shinybased within R : it gives me this error: Warning: running command 'octave -qf octave/muxMultisliceCommunity.m' had status 1 I was wondering if anyone could help me where the problem is and what is the status 1 mean? my system info : windows 8, octav

[R] Issue wit Package installation and download.file()

2015-02-22 Thread Aakrity Tibrewal
Hello, I have installed RStudio Version 0.98.1091, R version, R Version 3.1.2, on my Windows 7 desktop (64 bit). I am using wifi without any proxy server. Issues:- 1. I am unable to install the packages from CRAN mirror(India). I am getting the below error:- *Warning: unable to access index for