Re: [R] ALLOCATE in a FORTRAN subroutine

2016-03-03 Thread MAURICE Jean - externe
Hi Berend, >The question belongs on the R-devel mailinglist. I try to find this mailing-list ... >You are calling your Fortran routines directly from an R file with .Fortran, I >presume? Yes. Is there another solution (possibility ?) >Declare them with (:,:) or (*,*), allocate and the return t

Re: [R] package FD

2016-03-03 Thread Jim Lemon
Hi Fabio, You should write: class(...) where ... is the same as what you would type to have the variable displayed on the console. Looking at your earlier message, it might be: x$trait3 so try: class(x$trait3) Jim On Fri, Mar 4, 2016 at 11:30 AM, Fabio Monteiro wrote: > i just called trait

Re: [R] Error in upgrading ggplot2

2016-03-03 Thread Burhan ul haq
Thanks. I will try both the options 1) another mirror 2) upgrading R, and revert in case of issues. Br / On Fri, Mar 4, 2016 at 10:56 AM, Jeff Newmiller wrote: > The usual thing to try in cases like this is another mirror. > > Another worthwhile step is upgrading your R software to the latest.

Re: [R] Error in upgrading ggplot2

2016-03-03 Thread Jeff Newmiller
The usual thing to try in cases like this is another mirror. Another worthwhile step is upgrading your R software to the latest... if only to comply with the Posting Guide. -- Sent from my phone. Please excuse my brevity. On March 3, 2016 9:33:05 PM PST, Burhan ul haq wrote: >Hi, > >I was pl

[R] Error in upgrading ggplot2

2016-03-03 Thread Burhan ul haq
Hi, I was planning to use GGally, which required me to upgrade ggplot2 but despite trying multiple times, I have been unable to do so: The ggplot2 downloads and installs, but when I load it, I get the following message: > library("ggplot2", lib.loc="/usr/local/lib/R/site-library") Error in get(m

Re: [R] package FD

2016-03-03 Thread Fabio Monteiro
i just called trait3 to my variable. Is this what i'm suppose to wright? class(trait3), or class (my_trait3_variable? both give error 2016-03-03 23:42 GMT+00:00 Jim Lemon : > Hi Fabio, > It is possible that your remaining "numeric" variable is a factor. What > does: > > class(my_numeric_variabl

Re: [R] Extracting part of a factor

2016-03-03 Thread Hervé Pagès
On 03/03/2016 02:13 PM, KMNanus wrote: When I do that, When you do what exactly? It's impossible for anyone here to know what you're doing if you don't show the code. I get "Error in `$<-.data.frame`(`*tmp*`, "site", value = integer(0)) : replacement has 0 rows, data has 6” The data fram

Re: [R] package FD

2016-03-03 Thread Jim Lemon
Hi Fabio, It is possible that your remaining "numeric" variable is a factor. What does: class(my_numeric_variable) say? (where you substitute the name of your "numeric" variable) Jim On Fri, Mar 4, 2016 at 2:25 AM, Fabio Monteiro wrote: > Hello, my name is Fábio and I'm a Marine Ecology stude

Re: [R] RSNNS neural network

2016-03-03 Thread David Winsemius
> On Mar 3, 2016, at 12:33 PM, jake88 wrote: > > Data set attached … rename to mydata.csv . > > > > > > require ( RSNNS ) > mydata = read.csv("mydata.csv",header = TRUE) # Needed to change to mydata.txt > > mydata.train = mydata[3000:1,] > > mydata.test = mydata[10005:10006,] > > m

Re: [R] Extracting part of a factor

2016-03-03 Thread KMNanus
When I did that, I got - "Error in `$<-.data.frame`(`*tmp*`, "site", value = integer(0)) : replacement has 0 rows, data has 6” The data frame has 6 rows. Ken kmna...@gmail.com 914-450-0816 (tel) 347-730-4813 (fax) > On Mar 3, 2016, at 4:14 PM, Ista Zahn wrote: > > Like this? > > x <-

Re: [R] Extracting part of a factor

2016-03-03 Thread KMNanus
When I do that, I get "Error in `$<-.data.frame`(`*tmp*`, "site", value = integer(0)) : replacement has 0 rows, data has 6” The data frame has 6 rows. Ken kmna...@gmail.com 914-450-0816 (tel) 347-730-4813 (fax) > On Mar 3, 2016, at 4:52 PM, Hervé Pagès wrote: > > Hi, > > On 03/03/2016 1

Re: [R] Extracting part of a factor

2016-03-03 Thread Hervé Pagès
Hi, On 03/03/2016 12:18 PM, KMNanus wrote: I have a factor variable that is 6 digits and hyphenated. For example, 001-014. I need to extract the first 3 digits to a new variable using mutate in dplyr - in this case 001 - but can’t find a function to do it. substr will do this for character s

Re: [R] Extracting part of a factor

2016-03-03 Thread Ista Zahn
Like this? x <- factor("001-014") y <- substr(as.character(x), 1, 3) Best, Ista On Thu, Mar 3, 2016 at 3:18 PM, KMNanus wrote: > I have a factor variable that is 6 digits and hyphenated. For example, > 001-014. > > I need to extract the first 3 digits to a new variable using mutate in dply

[R] Extracting part of a factor

2016-03-03 Thread KMNanus
I have a factor variable that is 6 digits and hyphenated. For example, 001-014. I need to extract the first 3 digits to a new variable using mutate in dplyr - in this case 001 - but can’t find a function to do it. substr will do this for character strings, but I need the variable to remain as

Re: [R] RSNNS neural network

2016-03-03 Thread David Winsemius
> On Mar 3, 2016, at 10:30 AM, jake88 wrote: > > Data set attached … Perhaps it was, and if you replied-all then it might be in the copy that was sent directly to Charles, but it was not attached after the rhelp mail-server scrubbed it. It wasn't labeled correctly by your email client as MIME

Re: [R] estimate likelihood

2016-03-03 Thread ProfJCNash
Not possible, because the hessian is singular. Recoded as follows (your code should be executable before you put it in a help request). # asindii2.R -- Is it possible to estimate the likelihood parameter #and test for significant as follows: x <- c(1.6, 1.7, 1.7, 1.7, 1.8, 1.8, 1.8, 1.8) y <-

Re: [R] RSNNS neural network

2016-03-03 Thread jake88
Data set attached … require ( RSNNS ) mydata = read.csv("mydata.csv",header = TRUE) mydata.train = mydata[3000:1,] mydata.test = mydata[10005:10006,] myfit <- elman ( mydata.train[,2:19],mydata.train[,1], size =100 , learnFuncParams =c (0.1) , maxit =1000) pred <-predict (myfit ,

[R] estimate likelihood

2016-03-03 Thread Alaa Sindi
Hi all, Is it possible to estimate the likelihood parameter and test for significant as follows: x <- c(1.6, 1.7, 1.7, 1.7, 1.8, 1.8, 1.8, 1.8) y <- c( 6, 13, 18, 28, 52, 53, 61, 60) n <- c(59, 60, 62, 56, 63, 59, 62, 60) # note: there is no need to have the choose(n, y) term in the likelihood

Re: [R] splAw: RE: discriminant analysis lda under MASS

2016-03-03 Thread David L Carlson
I think the answer is in Venables and Ripley, Modern Applied Statistics with S. 4th Edition, 2002, page 332: "Fisher (1936) introduced a linear discriminant analysis seeking a linear combination xa of the variables that has a maximal ratio of the separation of the class means to the within-class

Re: [R] Ruofei Mo - How can I generate correlated data with non-normal distribution?

2016-03-03 Thread Dalthorp, Daniel
Ruofei, Ben's suggestion is simple and gets you close: require(MASS) nsim <- 100 rho <- -.9 Z <- mvrnorm(nsim, mu=c(0,0),Sigma = cbind(c(1,rho),c(rho, 1))) U <- pnorm(Z); a <- Z[,1] b <- qunif(U[,2]) cor(a,b) Pearson correlation characterizes the linear relationship between normal r.v.'s, bu

Re: [R] ALLOCATE in a FORTRAN subroutine

2016-03-03 Thread Berend Hasselman
> On 3 Mar 2016, at 13:57, MAURICE Jean - externe > wrote: > > Hi, > I am 'translating' R functions in FORTRAN subroutines. > > Very often, an R function gives an 'array' as result and you don't have to > bother with the dimension of the array : R creates automatically an array > with the g

[R] Polytonic Vector Analysis

2016-03-03 Thread Louise Venne
I'm looking for an R package to do Polytopic Vector Analysis (PVA) without success. I've checked CRAN, then did a site searched there, scanned the packages list, looked over old Help posting (there was a query about the same back in 2005 or so - only one response that didn’t give much direction

[R] package FD

2016-03-03 Thread Fabio Monteiro
Hello, my name is Fábio and I'm a Marine Ecology student in Portugal. I'm currently using the FD package for my work and yesterday one message appeared that I wasn't expecting and I really need your help to try to figure out what's happening. I'm using the dbFD function and the following message a

Re: [R] PCA on SNP genotypes

2016-03-03 Thread Andrés Aragón Martínez
Mohsen, Check at Bioconductor. Andrés > El 03/03/2016, a las 9:43, Mohsen Jafarikia escribió: > > Hello everyone: > > I have about a couple of thousands of samples each with about 100 SNP > genotypes and I would like to do PCA using genotypes. I looked on the > web and found different option

[R] PCA on SNP genotypes

2016-03-03 Thread Mohsen Jafarikia
Hello everyone: I have about a couple of thousands of samples each with about 100 SNP genotypes and I would like to do PCA using genotypes. I looked on the web and found different options available on R for PCA. I was wondering if I could have advice about the program fits better what I am trying

Re: [R] Problem installing packages: cannot open file '/sw/Library/Frameworks/R.framework/Versions/3.2/Resources/etc/Makeconf'

2016-03-03 Thread John Hillier
Dear David, Thank you very much! I am sending this mail for the record. I am on mac OSX 10.8.5. The "standard" binary installer packages worked and fixed the problem (R-3.2.1-snowleopard.pkg, RStudio 0.99.891 - Mac OS X 10.6+ (64-bit)). So, a caution against fink (r-base and rstudio-desktop)

Re: [R] discriminant analysis lda under MASS

2016-03-03 Thread Jens Koch
Thank you for your answer. Please let me provide additional information:   You have a pooled variance covariance matrix S (2x2). The matrix needs to be inverted: S^-1. The calculation of the coeffcients is done by S^-1 (average (x1) - average (x2)). average (x1) is the vector of means (2x1) in

Re: [R] RSNNS neural network

2016-03-03 Thread Charles Determan
Unfortunately we can only provide so much help without a reproducible example. Can you use a dataset that everyone would have access to to reproduce the problem? Otherwise it is difficult for anyone to help you. Regards, Charles On Tue, Mar 1, 2016 at 12:35 AM, jake88 wrote: > I am new to R a

Re: [R] Namespace problem with pre-R 3.0.0 package

2016-03-03 Thread Sebastien Moretti
Le 03/03/2016 03:02 PM, Marc Schwartz a écrit : On Mar 3, 2016, at 7:40 AM, Sebastien Moretti wrote: Hi I have issues with an R package developed in 2004. It works perfectly in R < 3. It can be installed in R > 3 but functions are not in the namespace. Do you know a good - and simple - docu

Re: [R] Namespace problem with pre-R 3.0.0 package

2016-03-03 Thread Marc Schwartz
> On Mar 3, 2016, at 7:40 AM, Sebastien Moretti > wrote: > > Hi > > I have issues with an R package developed in 2004. > It works perfectly in R < 3. > It can be installed in R > 3 but functions are not in the namespace. > > Do you know a good - and simple - documentation to help me to solve

Re: [R] discriminant analysis lda under MASS

2016-03-03 Thread David L Carlson
If the textbook provides the equations, you can work through them directly. But without knowing more, it is hard to say. You could also contact the author of the textbook. - David L Carlson Department of Anthropology Texas A&M University College Station, TX 77

Re: [R] Unicode Text Segmentation Algorithms already implemented in R?

2016-03-03 Thread Ista Zahn
You searched, but did not tell us what you found, nor why it was unsuitable for you undescribed use case. So all we can do is guess: my guess is http://docs.rexamine.com/R-man/stringi/stringi-search-boundaries.html Best, Ista On Mar 3, 2016 8:14 AM, "Sascha Wolfer" wrote: > Hello list members, >

[R] Namespace problem with pre-R 3.0.0 package

2016-03-03 Thread Sebastien Moretti
Hi I have issues with an R package developed in 2004. It works perfectly in R < 3. It can be installed in R > 3 but functions are not in the namespace. Do you know a good - and simple - documentation to help me to solve that? I have already fixed some problems with R CMD check but remaining one

[R] Unicode Text Segmentation Algorithms already implemented in R?

2016-03-03 Thread Sascha Wolfer
Hello list members, I am looking for an implementation of Unicode text segmentation (word boundary detection) algorithms in R. You can find information about the algorithms here: http://www.unicode.org/reports/tr29/#Word_Boundaries The help page for the function ‚casefuns‘ from the excellent ‚U

[R] ALLOCATE in a FORTRAN subroutine

2016-03-03 Thread MAURICE Jean - externe
Hi, I am 'translating' R functions in FORTRAN subroutines. Very often, an R function gives an 'array' as result and you don't have to bother with the dimension of the array : R creates automatically an array with the good length. It's not really the case with FORTRAN. Until now, I create an ar

Re: [R] Extract row form a dataframe by row names in another vector and factor . Need explanation

2016-03-03 Thread Mohammad Tanvir Ahamed via R-help
Dear Dennis Thank you very much for your detail reply . It was really helpful to understand. Tanvir Ahamed Göteborg, Sweden | mashra...@yahoo.com From: Dennis Murphy Sent: Thursday, 3 March 2016, 4:38 Subject: Re: [R] Extract row form a dataframe by row