Re: [R] UNSUBCRIBE

2015-03-21 Thread David Winsemius
Nope. Wrong address for an automated efforts at changing subscription preferences, and it would not have worked anyway because you did not provide your password. Most people who started using the Internet in the last 20 years will need to use the web interface at the address in the message foote

Re: [R] RSQLite will not install in R 2.15.0

2015-03-21 Thread billy am
Hi Brendon , Pls download and install the latest R version and try again. > version _ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 3 minor 1.3 year 2015 month 03 day

Re: [R] automatic coercicion

2015-03-21 Thread Boris Steipe
See the help page for the "[" operator ... ?"[" ... and use the drop parameter as in: A[1,,drop=FALSE] [,1] [,2] [,3] [,4] a1147 10 B. On Mar 21, 2015, at 8:10 AM, J Robertson-Burns wrote: > This is Circle 8.1.44 of 'The R Inferno'. > > http://www.burns-stat.com/documents

Re: [R] RSQLite will not install in R 2.15.0

2015-03-21 Thread Jeff Newmiller
The posting guide warns you that this list is only for questions regarding the current version of R. You probably need to be sure to use versions of packages that were current as of the time that version of R was current... anything else is a wild ride for you. --

Re: [R] automatic coercicion

2015-03-21 Thread J Robertson-Burns
This is Circle 8.1.44 of 'The R Inferno'. http://www.burns-stat.com/documents/books/the-r-inferno/ Pat On 21/03/2015 11:04, jean.cour...@math.u-psud.fr wrote: My question must be a trivial one. There is automatic coercicion to vector when extracting only one line of a matrix. # example A = ma

[R] UNSUBCRIBE

2015-03-21 Thread Shenglin Chen
[[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide comm

[R] RSQLite will not install in R 2.15.0

2015-03-21 Thread brendon wolff-piggott
I'm trying to install RSQLite on the way to installing RQDA. I have installed DBI, and RSQLite compiles but will not install. Running install.packages("RSQLite") fails with the following messages: ... ** preparing package for lazy loading Error in setClass("SQLiteConnection", contains = "DBIConn

[R] WG: Questions about neural networks in RSNNS

2015-03-21 Thread im db
Dear All,I'm using RSNNS package in R, for Elman Neural Network. Now I have some question.s1- How can i set the weight range for the Elman Netwrok in RSNNS Package? At the end my goal is to have activation value range between 0 and 1.2- How can i use Softmax activation function for the elman ne

Re: [R] ordering a boxplot

2015-03-21 Thread Boris Steipe
... just for completeness - the more concise way: (no need to go through names()). boxplot(mydata[,order(apply(mydata,2,median))]) ... or descending boxplot(mydata[,order(-apply(mydata,2,median))]) B. On Mar 21, 2015, at 7:04 PM, Boris Steipe wrote: > There may be more concise ways to d

[R] Dealing with NA in "tbl_df"?

2015-03-21 Thread Michael Hannon
Greetings. I was reading through the vignette for "tidy-data" (from the "tidyr" package) and came across something that puzzled me. One of the examples in the vignette uses a data set related to tuberculosis, originally from the World Health Organization, but also available at: https://github.

Re: [R] ordering a boxplot

2015-03-21 Thread Boris Steipe
There may be more concise ways to do this - but you are 99% there with your approach: try: boxplot(mydata[,names(sort(apply(mydata,2,median)))]) B. On Mar 21, 2015, at 6:49 PM, Antonio Silva wrote: > Thanks Bill and David > > Here goes an example > > SP1<-c(9,6,7,8,5,8,7,5,9,7) > SP2<-c(1,

Re: [R] ordering a boxplot

2015-03-21 Thread Antonio Silva
Thanks Bill and David Here goes an example SP1<-c(9,6,7,8,5,8,7,5,9,7) SP2<-c(1,3,4,2,4,2,5,3,2,1) SP3<-c(4,6,7,5,7,8,7,6,5,4) SP4<-c(5,4,3,5,2,3,4,3,4,2) mydata<-data.frame(SP1,SP2,SP3,SP4) rownames(mydata)<-c("ST1","ST2","ST3","ST4","ST5","ST6","ST7","ST8","ST9","ST10") mydata boxplot(mydata)

Re: [R] ordering a boxplot

2015-03-21 Thread William Dunlap
You can use the reorder() function to reorder the grouping vector's factor levels according to a function of the data in each group. E.g., compare the following two plots: d <- data.frame(Response=cos(1:15), Group=rep(c("A","B","C"),c(6,5,4))) par(mfrow=c(1,2)) boxplot(Response ~ Group,

Re: [R] ordering a boxplot

2015-03-21 Thread David Winsemius
On Mar 20, 2015, at 2:20 PM, Antonio Silva wrote: > Hello > > I'm using a dataframe (mydata) where row names are sampling points and > column names are species in a multivariate analysis. > > If I write boxplot(mydata) I'll have boxplots for each species abundance in > alphabetical order. > >

Re: [R] Joining two datasets - recursive procedure?

2015-03-21 Thread Bert Gunter
... or cleaner: z1 <- with(f1,v4 + z -ave(z,v1,v2,FUN=mean)) Just for curiosity, was this homework? (in which case I should probably have not provided you an answer -- that is, assuming that I HAVE provided an answer). Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374

Re: [R] Joining two datasets - recursive procedure?

2015-03-21 Thread Bert Gunter
z <- rnorm(nrow(f1)) ## or anything you want z1 <- f1$v4 + z - with(f1,ave(z,v1,v2,FUN=mean)) aggregate(v4~v1,f1,sum) aggregate(z1~v1,f1,sum) aggregate(v4~v2,f1,sum) aggregate(z1~v2,f1,sum) aggregate(v4~v3,f1,sum) aggregate(z1~v3,f1,sum) Cheers, Bert Bert Gunter Genentech Nonclinical Biostatis

Re: [R] Optimization to fit data to custom density distribution

2015-03-21 Thread Prof Brian Ripley
On 21/03/2015 14:27, Johannes Radinger wrote: Thanks for the fast response. The fitdistr() function works well for the predefined density functions. However, what is the recommended approach to optimize/fit a density function described by two superimposed normal distributions? In my case it is N1

Re: [R] Optimization to fit data to custom density distribution

2015-03-21 Thread Johannes Radinger
Thanks for the fast response. The fitdistr() function works well for the predefined density functions. However, what is the recommended approach to optimize/fit a density function described by two superimposed normal distributions? In my case it is N1(mean=0,sd1)*p+N2(mean=0,sd2)*(1-p). With fitdis

Re: [R] Joining two datasets - recursive procedure?

2015-03-21 Thread Luca Meyer
Hi Bert, Thank you for your message. I am looking into ave() and tapply() as you suggested but at the same time I have prepared a example of input and output files, just in case you or someone else would like to make an attempt to generate a code that goes from input to output. Please see below o

Re: [R] Optimization to fit data to custom density distribution

2015-03-21 Thread Prof Brian Ripley
One way using the standard R distribution: library(MASS) ?fitdistr No optimization is needed to fit a normal distribution, though. On 21/03/2015 13:05, Johannes Radinger wrote: Hi, I am looking for a way to fit data (vector of values) to a density function using an optimization (ordinary leas

[R] Optimization to fit data to custom density distribution

2015-03-21 Thread Johannes Radinger
Hi, I am looking for a way to fit data (vector of values) to a density function using an optimization (ordinary least squares or maximum likelihood fit). For example if I have a vector of 100 values generated with rnorm: rnorm(n=100,mean=500,sd=50) How can I fit these data to a Gaussian density

Re: [R] Joining two datasets - recursive procedure?

2015-03-21 Thread Bert Gunter
1. Still not sure what you mean, but maybe look at ?ave and ?tapply, for which ave() is a wrapper. 2. You still need to heed the rest of Jeff's advice. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowled

Re: [R] Joining two datasets - recursive procedure?

2015-03-21 Thread Luca Meyer
Hi Jeff & other R-experts, Thank you for your note. I have tried myself to solve the issue without success. Following your suggestion, I am providing a sample of the dataset I am using below (also downloadble in plain text from https://www.dropbox.com/s/qhmpkkrejjkpbkx/sample_code.txt?dl=0): #th

Re: [R] automatic coercicion

2015-03-21 Thread Adams, Jean
>From one Jean to another ... A[i, , drop=FALSE] On Sat, Mar 21, 2015 at 6:04 AM, wrote: > My question must be a trivial one. > > There is automatic coercicion to vector when extracting only one line of a > matrix. > # example > A = matrix(1:12,3,4) > rownames(A) = c('a1','a2','a3') > > i = 1:2

[R] automatic coercicion

2015-03-21 Thread Jean . Coursol
My question must be a trivial one. There is automatic coercicion to vector when extracting only one line of a matrix. # example A = matrix(1:12,3,4) rownames(A) = c('a1','a2','a3') i = 1:2 A[i,] #[,1] [,2] [,3] [,4] # a1147 10matrix # a2258 11 i = 1 A[i,] # [1