Re: [R] Simplifying an expression with an integral

2013-12-24 Thread David Winsemius
On Dec 24, 2013, at 9:39 AM, Aurélien Philippot wrote: > Dear R experts, > I am computing the following integral. > > [image: \int_{1,100} \frac{1}{x+Max(x-50,0)} g(x)dx], where g is the > density of the standard normal, and [1,100] is the domain. > > 1) I use the following code which works fin

Re: [R] label in scatter3d plot

2013-12-24 Thread eliza botto
Dear ligges, Thanks for your reply. it worked out. Happy Christmas, Eliza > Date: Wed, 25 Dec 2013 01:09:52 +0100 > From: lig...@statistik.tu-dortmund.de > To: eliza_bo...@hotmail.com; r-help@r-project.org > Subject: Re: [R] label in scatter3d plot > > See what scatterplot3d() return. This is rat

Re: [R] label in scatter3d plot

2013-12-24 Thread Uwe Ligges
See what scatterplot3d() return. This is rather helpful, i.e. try s3d <- scatterplot3d(x,y,z, main="3D Scatterplot") text(s3d$xyz.convert(x,y,z)$x, s3d$xyz.convert(x,y,z)$y, V4, pos=4, cex=0.7) Well, you still don't see too much, but at least it does what you were asking for. Best, Uwe Ligges

[R] label in scatter3d plot

2013-12-24 Thread eliza botto
Dear Users of R, I plotted the following data by >scatterplot3d(x,y,z, main="3D Scatterplot") Then i wanted to label the points on that plot w.r.t column 4. i unsuccessfully tried textxy() & text3d() Kindly guide me through > dput(test) structure(list(x = c(458750L, 460350L, 415750L, 356250L, 387

Re: [R] error in "ca.jo"

2013-12-24 Thread Jeff Newmiller
I am sorry you have chosen to interpret my response as unfriendly. I do not expect you or anyone posting here to be an expert before posting. However, the context here is that you have to read our responses anyway, so both Pat and I have recommended higher-quality reading material than we can wr

Re: [R] [R-SIG-Finance] error in "ca.jo"

2013-12-24 Thread Joshua Ulrich
On Tue, Dec 24, 2013 at 3:36 PM, mamush bukana wrote: > Hi Jeff, > >From your words (if our words really describe us), I hope you don't expect > me to teach you that this is "r-help" room. I don't expect you to tell me > that I am a layman. I already know it and that is why I am here seeking a > h

Re: [R] Fitdistr and mle

2013-12-24 Thread Tia Borrelli
Thanks for answering, in ret i've the returns of FTSE MIB (the benchmark stock market index in Italy) and i'm estimating the parametres of the distribution of the returns of the index using different methods.  I need the mle and i found this two function and i could not understand why the resul

[R] Transferring data from R to MATLAB via Rmatlab package

2013-12-24 Thread Anton Sylchenko
Hi all, I spent a whole day on the internet trying to figure this out but no luck, so I was wondering if anyone would be able to help me. I am running code that requires me set up variables in R, establish a connection to MATLAB, set matlab variables based on the previous variables in R via the c

Re: [R] error in "ca.jo"

2013-12-24 Thread mamush bukana
Hi Jeff, >From your words (if our words really describe us), I hope you don't expect me to teach you that this is "r-help" room. I don't expect you to tell me that I am a layman. I already know it and that is why I am here seeking a help. If I am an expert of things I asked here, there is no need f

Re: [R] unique mismatch in R and Excel

2013-12-24 Thread David Winsemius
On Dec 24, 2013, at 1:08 AM, Koushik Saha wrote: > i have a wired problem. i want to count the unique entry in a certain > column.Here i have attached my csv file. Files named with extension .csv do not typically make it through the R-help mail server. > > i am doing this to get the unique en

[R] Simplifying an expression with an integral

2013-12-24 Thread Aurélien Philippot
Dear R experts, I am computing the following integral. [image: \int_{1,100} \frac{1}{x+Max(x-50,0)} g(x)dx], where g is the density of the standard normal, and [1,100] is the domain. 1) I use the following code which works fine: integrand1<- function(x){1/x*dnorm(x)} integrand2<- function(x){1/(2

Re: [R] error in "ca.jo"

2013-12-24 Thread Jeff Newmiller
Once you start describing your code in language that indicates you have read some of the recommended materials, we can make some progress. For example, you are still posting in HTML format so your code is getting mangled (see Posting Guide). You don't seem to understand what tryCatch does (see ?

Re: [R] Mean: category wise within a data frame

2013-12-24 Thread arun
HI, May be this helps: Please use ?dput() to show the example dataset dat1 <- read.table(text="Categories  Variable Frequencies 1 0.009 1003 1 0.867 1200 1 0.567 987 1 0.765 134 1 0.445 890 2 0.007 899   2 0.768 707    2 0.789 865 2 0.544  678    2  0.987 889",sep="",

Re: [R] replace NA with another vector

2013-12-24 Thread arun
 z <- x  z[is.na(z)] <- y  z #[1] 20 40  3 50  1 A.K. On Tuesday, December 24, 2013 12:06 PM, Kathryn Lord wrote: Dear R users, I have two different vectors like below x <- c( NA, NA, 3, NA, 1) y <- c( 20, 40 ,50) Combining x and y, I'd like to create new vector z z <- c(20, 40, 3, 50, 1

Re: [R] unique mismatch in R and Excel

2013-12-24 Thread Duncan Murdoch
On 13-12-24 4:08 AM, Koushik Saha wrote: i have a wired problem. i want to count the unique entry in a certain column.Here i have attached my csv file. i am doing this to get the unique entries in the column. dat<-read.csv("C:/Project/Gawk-scripts/Book1.csv") names(dat)<-c("user_name") unique(d

[R] replace NA with another vector

2013-12-24 Thread Kathryn Lord
Dear R users, I have two different vectors like below x <- c( NA, NA, 3, NA, 1) y <- c( 20, 40 ,50) Combining x and y, I'd like to create new vector z z <- c(20, 40, 3, 50, 1) Any suggestion will be greatly appreciated. Best, Kathryn Lord [[alternative HTML version deleted]] _

Re: [R] Test to determine if there is a difference between two means

2013-12-24 Thread Bert Gunter
Inline below. Cheers, Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." H. Gilbert Welch On Tue, Dec 24, 2013 at 7:38 AM, wesley bell wrote: > Hi, > I have a data set where there ar

Re: [R] Mean: category wise within a data frame

2013-12-24 Thread David Carlson
Please do not use html formatting in your messages to the list. The format codes are stripped and you table becomes a single long column (see below). Only use plain text emails and use the results of dput(mydata) to insert your data into the message. As to your question. Look at the aggregate() fu

Re: [R] Fitdistr and mle

2013-12-24 Thread Ben Bolker
Tia Borrelli yahoo.it> writes: > > Hello, i'm using R for the exploration of a time series and i'm stuck in a problem with the fitting of the distribution. > What's the difference between "fitdistr" and "mle"? Hard to say without a reproducible example. In the example below the answers are n

Re: [R] error in "ca.jo"

2013-12-24 Thread mamush bukana
Dear Pat, I tried your suggestion: for(i in 1:N1){ for(j in 1:N2){ co<-tryCatch(ca.jo (data.frame(cbind(y2[ i,j,],y1[i,j,])),type="trace", K=2, spec="transitory",ecdet="const",season=NULL,dumvar=NULL),error=function(e) NaN) }} and the earlier error does not show up. However, when I t

[R] Mean: category wise within a data frame

2013-12-24 Thread Nandini Jayakumar
Hello all I have a table a sample of which is as follows: Categories Variable (x)

[R] Test to determine if there is a difference between two means

2013-12-24 Thread wesley bell
Hi, I have a data set where there are 20 experiments which each ran for 10 minutes. In each experiment an insect had a choice to spend time in one of two chambers. Each experiment therefore has number of seconds spent in each chamber. I want to know whether there is a difference in the mean time

[R] unique mismatch in R and Excel

2013-12-24 Thread Koushik Saha
i have a wired problem. i want to count the unique entry in a certain column.Here i have attached my csv file. i am doing this to get the unique entries in the column. dat<-read.csv("C:/Project/Gawk-scripts/Book1.csv") names(dat)<-c("user_name") unique(dat$user_name) results says i have 170 uniq