Re: [R] Quotes

2015-11-11 Thread PIKAL Petr
Hi Can you explain little bit more about your intention? Here is some explanation about quotes https://stat.ethz.ch/R-manual/R-devel/library/base/html/Quotes.html http://stackoverflow.com/questions/13449233/send-a-text-string-containing-double-quotes-to-function You could find it yourself easi

Re: [R] seconds to h:m:s format

2015-11-11 Thread Jim Lemon
Any date would do as you are only getting the H:M:S at the end. I just chose the zero date. Jim On Thu, Nov 12, 2015 at 1:25 PM, Omar André Gonzáles Díaz < oma.gonza...@gmail.com> wrote: > Thank you, Jim. > > Just to understand it: > > You replicated 10 times: "1970-01-01". Why this specific da

Re: [R] Quotes

2015-11-11 Thread David Winsemius
> On Nov 11, 2015, at 6:54 PM, Daniel Wiegert wrote: > > Hello, I am trying to use a code which requires quotes around each of about > 1000 entries. When I did this The use of pronouns in place of code is a major cause of ambiguity. What was … “this”? > in Microsoft programs, R rejected eve

Re: [R] Plot with pauses?

2015-11-11 Thread David Winsemius
> On Nov 11, 2015, at 9:30 PM, Judson wrote: > > I'm trying to create a > series of demos for students. > > It would be helpful > if plotted data points > could appear one by one > with, say, half-second delays > between points. > ?Sys.sleep > For instance, > code like this > > v<-0

[R] Problem with Downloading TRMM

2015-11-11 Thread Eliza Botto
Dear Users of R, I have this following confusion. I want to download 3 hourly TRMM data from NASA website by using R, from the following website ##main Link http://giovanni.gsfc.nasa.gov/giovanni/#service=ArAvTs&starttime=2008-12-31T00:00:00Z&endtime=2009-12-31T23:59:59Z&bbox=67,-50,67,-50&data=

[R] Quotes

2015-11-11 Thread Daniel Wiegert
Hello, I am trying to use a code which requires quotes around each of about 1000 entries. When I did this in Microsoft programs, R rejected every quote. I converted the font to courier new size 10 true type (the R default). No luck. I had to find a sample code and copy the quotes from that 2000

[R] Plot with pauses?

2015-11-11 Thread Judson
I'm trying to create a series of demos for students. It would be helpful if plotted data points could appear one by one with, say, half-second delays between points. For instance, code like this v<-0:60 z<-3/5+4i/5 t<-z^(v/9) plot(Re(t),Im(t)) would be better if I could invoke some pa

Re: [R] Calculating distance between words in string

2015-11-11 Thread Jim Lemon
Perhaps what you are seeking is a sparse distance matrix. "How far is each word from every other matching word" sentence<-"How far is each word from every other matching word" words<-tolower(unlist(strsplit(sentence," "))) nwords<-length(words) wdm<-matrix(NA,nrow=nwords,ncol=nwords) for(word in

Re: [R] Cleaning

2015-11-11 Thread Boris Steipe
If what you posted here is what you typed, your syntax is wrong. I strongly advise you to consult the two links here: http://adv-r.had.co.nz/Reproducibility.html http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example ... and please read the posting guide and don't po

Re: [R] Cleaning

2015-11-11 Thread Ashta
Sarah, Thank you very much. For the other variables I was trying to do the same job in different way because it is easier to list it Example test < which(dat$var1 !="BAA" | dat$var1 !="FAG" ) { dat <- dat[-test,]} and I did not get the right result. What am I missing here? On Wed

Re: [R] seconds to h:m:s format

2015-11-11 Thread Omar André Gonzáles Díaz
Thank you, Jim. Just to understand it: You replicated 10 times: "1970-01-01". Why this specific date? 2015-11-11 20:22 GMT-05:00 Jim Lemon : > Hi Omar, > There is some sort of error in your structure definition, but the > following works for me: > > session.duration.fuente <- > data.frame(

Re: [R] Cleaning

2015-11-11 Thread Sarah Goslee
On Wed, Nov 11, 2015 at 8:44 PM, Ashta wrote: > Hi Sarah, > > I used the following to clean my data, the program crushed several times. > > test <- dat[dat$Var1 == "YYZ" | dat$Var1 =="MSN" ,] > > What is the difference between these two > > test <- dat[dat$Var1 %in% "YYZ" | dat$Var1 %in% "MSN" ,]

Re: [R] Cleaning

2015-11-11 Thread Ashta
Hi Sarah, I used the following to clean my data, the program crushed several times. *test <- dat[dat$Var1 == "YYZ" | dat$Var1 =="MSN" ,]* *What is the difference between these two**test <- dat[dat$Var1 **%in% "YYZ" | dat$Var1** %in% "MSN" ,]* On Wed, Nov 11, 2015 at 6:38 PM, Sarah Goslee

Re: [R] seconds to h:m:s format

2015-11-11 Thread Jim Lemon
Hi Omar, There is some sort of error in your structure definition, but the following works for me: session.duration.fuente <- data.frame(mes=c(rep("oct",5),rep("nov",5)), fuente=c("adwords", "directo", "organico", "redes sociales", "referral", "adwords", "directo", "organico", "redes sociale

Re: [R] Cleaning

2015-11-11 Thread Sarah Goslee
Please keep replies on the list so others may participate in the conversation. If you have a character vector containing the potential values, you might look at %in% for one approach to subsetting your data. Var1 %in% myvalues Sarah On Wed, Nov 11, 2015 at 7:10 PM, Ashta wrote: > Thank you Sar

Re: [R] Cleaning

2015-11-11 Thread Sarah Goslee
Hi, On Wed, Nov 11, 2015 at 6:51 PM, Ashta wrote: > Hi all, > > I have a data frame with huge rows and columns. > > When I looked at the data, it has several garbage values need to be > > cleaned. For a sample I am showing you the frequency distribution > of one variables > > Var1 Freq > 1

[R] Cleaning

2015-11-11 Thread Ashta
Hi all, I have a data frame with huge rows and columns. When I looked at the data, it has several garbage values need to be cleaned. For a sample I am showing you the frequency distribution of one variables Var1 Freq 1:3 2]6 3MSN 1040 4YYZ 300 5\\4 6+

[R] seconds to h:m:s format

2015-11-11 Thread Omar André Gonzáles Díaz
Hi, I've a data frame with 3 columns: "mes", "fuente", "avg.sessions.duration". "avg.sessions.duration" is a column containing seconds. I need you help with: 1.- Help to put these values in "h:m:s" format. . === I've found this german page:

Re: [R] About error: L-BFGS-B needs finite values of 'fn'

2015-11-11 Thread Ravi Varadhan
It seems like there is substantial finite-sample bias in the MLEs. Either that or there is some error in your procedure. See attached code. Ravi From: Ravi Varadhan Sent: Wednesday, November 11, 2015 2:33 PM To: 'denizozo...@gazi.edu.tr' ; r-help@r-project.org Cc: 'profjcn...@gmail.com' Subje

Re: [R] About error: L-BFGS-B needs finite values of 'fn'

2015-11-11 Thread Ravi Varadhan
With a small sample size, n=30, you will have realizations of data where you will run into difficulties with the MLE of generalized Gamma distribution. This is mainly due to the `k' parameter. Increase the sample size (e.g., n=50 or 100) and this problem is less likely to happen (but can still

Re: [R] R packages/code for CART that is written entirely in R (not C)

2015-11-11 Thread Andrew Crane-Droesch
Thanks for the reference! I'd still be grateful for any pointers towards code for CART that has been written entirely in R, perhaps that hasn't made its way onto CRAN. On 11/11/2015 02:00 PM, David Winsemius wrote: On Nov 11, 2015, at 9:25 AM, Andrew Crane-Droesch wrote: Dear List, I'd lik

Re: [R] R packages/code for CART that is written entirely in R (not C)

2015-11-11 Thread David Winsemius
> On Nov 11, 2015, at 9:25 AM, Andrew Crane-Droesch wrote: > > Dear List, > > I'd like to make a few modifications to the typical CART algorithm, and > I'd rather not code the whole thing from scratch. Specifically I want > to use different in-sample and out-of-sample fit criteria in the spl

[R] R packages/code for CART that is written entirely in R (not C)

2015-11-11 Thread Andrew Crane-Droesch
Dear List, I'd like to make a few modifications to the typical CART algorithm, and I'd rather not code the whole thing from scratch. Specifically I want to use different in-sample and out-of-sample fit criteria in the split choosing and cross-validation stages. I see however that the code for

Re: [R] Advice collating an R package

2015-11-11 Thread Jeff Newmiller
A) Do you have problem? Have you tried it? B) There is a mailing list for this sort of question... read the Posting Guide. C) What is a constant? In R, it is just another variable. The purpose of packages is to collect variables in namespaces in memory for easy access. Which means that "include

Re: [R] random number generation

2015-11-11 Thread Michael Dewey
Dear Leila Does the function mvrnorm in package MASS do what you want? On 11/11/2015 08:38, leila zamani via R-help wrote: Hi every one, I'm new to R. I read about R and search all the packages but I couldn't find the package that I want. I want to generate 2D (matrices) random numbers that h

Re: [R] random number generation

2015-11-11 Thread Karim Mezhoud
Hi, This generate matrix: matrix( rnorm(5*4,mean=0,sd=1), 5, 4) for correlated matrix please see this link: http://stackoverflow.com/questions/10680658/how-can-i-create-a-correlation-matrix-in-r Karim On Wed, Nov 11, 2015 at 9:38 AM, leila zamani via R-help < r-help@r-project.org> wrote: > Hi e

Re: [R] Advice collating an R package

2015-11-11 Thread Duncan Murdoch
On 11/11/2015 7:16 AM, Glenn Schultz wrote: Hi All, When collating a package - where does the file of constants go? I have an R package that defines 36 new classes and the AllClasses file is getting quite long. I would like to re-organize the files the following way - which is also easier for

[R] TRMM download loop

2015-11-11 Thread Eliza Botto
Dear Users of R, I have this following confusion. Some months ago I use to download 3 hourly TRMM data from NASA website by using the R from the following website http://giovanni.gsfc.nasa.gov/giovanni/#service=ArAvTs&starttime=2008-12-31T00:00:00Z&endtime=2009-12-31T23:59:59Z&bbox=67,-50,67,-50&

[R] Advice collating an R package

2015-11-11 Thread Glenn Schultz
Hi All, When collating a package - where does the file of constants go? I have an R package that defines 36 new classes and the AllClasses file is getting quite long.  I would like to re-organize the files the following way - which is also easier for my personal mental map of what is going on.

[R] TRMM download loop

2015-11-11 Thread Eliza Botto
Dear Users of R, I have this following confusion. Some months ago I use to download 3 hourly TRMM data from NASA website by using the R from the following website http://giovanni.gsfc.nasa.gov/giovanni/#service=ArAvTs&starttime=2008-12-31T00:00:00Z&endtime=2009-12-31T23:59:59Z&bbox=67,-50,67,-50&

[R] random number generation

2015-11-11 Thread leila zamani via R-help
Hi every one, I'm new to R. I read about R and search all the packages but I couldn't find the package that I want. I want to generate 2D (matrices) random numbers that have correlation between them. One of my friends said that R has a function in geor like rand...(spherical (correlation coeffic

Re: [R] no results

2015-11-11 Thread William Dunlap
If you are running these commands from a file using source() then replacing 'summary(sem)' with 'print(summary(sem))' would help, as would adding echo=TRUE or print.eval=TRUE to the source() command. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Nov 10, 2015 at 11:47 AM, Alaa Sindi wrote

Re: [R] Using regex to truncate repeating characters

2015-11-11 Thread Marc Schwartz
> On Nov 11, 2015, at 3:02 AM, Karl wrote: > > Hi all, > > I'm trying to learn how to use regex inside R. I'm far from an expert when > it comes to this, but google is my friend when it comes to finding suitable > pieces of syntax to start building from. For example, this post seems to do > wha

Re: [R] Calculating distance between words in string

2015-11-11 Thread S Ellison
> -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Karl > Subject: [R] Calculating distance between words in string > > .. given a specific keyword, I need to assign labels to the other words > based on the distance (number of words) to this keyword. > >

Re: [R] How to calculate variance on multiple numbers at once?

2015-11-11 Thread S Ellison
> -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Luigi > Marongiu > if I have a sample set of the following numbers x1=0.09, x2=0.94, x3=0.48, > x4=0.74, x5=0.04 I can calculate the variance easily. Not without concatenating them into a vector, you ca

[R] How to calculate variance on multiple numbers at once?

2015-11-11 Thread Luigi Marongiu
Dear all, if I have a sample set of the following numbers x1=0.09, x2=0.94, x3=0.48, x4=0.74, x5=0.04 I can calculate the variance easily. But if each x is actually a subset of multiple values, what would be the formula to calculate the variance? and it is possible to implement such mathematical f

[R] Mixed modelling course, Lisbon, Portugal

2015-11-11 Thread Highland Statistics Ltd
We would like to announce the following statistics course: Course: Introduction to Linear mixed effects models, GLMM and MCMC with R Where: Lisbon, Portugal When: 15-19 February 2016 Course website: http://www.highstat.com/statscourse.htm Course flyer: http://highstat.com/Courses/Flyers/Fly

[R] Using regex to truncate repeating characters

2015-11-11 Thread Karl
Hi all, I'm trying to learn how to use regex inside R. I'm far from an expert when it comes to this, but google is my friend when it comes to finding suitable pieces of syntax to start building from. For example, this post seems to do what I want: http://stackoverflow.com/questions/12258622/regul