Re: [R] Parts of Speach Tagging

2013-08-24 Thread Tyler Rinker
Have a look at ?Maxent_POS_Tag_Annotator The examples show you how to get the tagPOS behavior. Cheers,Tyler > Date: Sun, 25 Aug 2013 04:11:33 +0530 > From: sid.aru...@gmail.com > To: r-help@r-project.org; r-h...@stat.math.ethz.ch > Subject: [R] Parts of Speach Tagging > > I was using tagPOS fun

Re: [R] how to apply summation sign formula to R

2013-08-24 Thread Berend Hasselman
On 24-08-2013, at 23:13, Sebastian Hersberger wrote: > Thanks. I restate my problem/question and hope its better understandable now. > > Let us define A and B as kxk matrices. C is the output (matrix), which I try > to calculate for differnt i values. > > So for example: I want to caluclate

Re: [R] Capturing the whole output using R

2013-08-24 Thread arun
Hi, May be this helps: #Creating some dummy data.  set.seed(24) lst1<-lapply(1:8,function(x) ts(sample(1:25,20,replace=TRUE))) set.seed(49) lst2<-lapply(1:8,function(x) ts(sample(1:45,20,replace=TRUE))) ??Find_Max_CCF() #No vignettes or demos or help files found with alias or concept or #title

Re: [R] Divide the data into sub data on a particular condition

2013-08-24 Thread arun
Hi, Try this: sapply(lst1,function(x) with(x,cor(CF,OSA))) #  2231   2232   2233 #-0.9607689 -1.000  0.9973233 #or library(plyr)  ddply(dat1,.(BaseProd),summarize,Cor=cor(CF,OSA)) #  BaseProd    Cor #1 2231 -0.9607689 #2 2232 -1.000 #3 2233  0.9973233 #or  

Re: [R] how to apply summation sign formula to R

2013-08-24 Thread David Winsemius
On Aug 24, 2013, at 6:43 PM, David Winsemius wrote: > > On Aug 24, 2013, at 2:13 PM, Sebastian Hersberger wrote: > >> Thanks. I restate my problem/question and hope its better understandable now. >> >> Let us define A and B as kxk matrices. C is the output (matrix), which I try >> to calculat

Re: [R] how to apply summation sign formula to R

2013-08-24 Thread David Winsemius
On Aug 24, 2013, at 2:13 PM, Sebastian Hersberger wrote: > Thanks. I restate my problem/question and hope its better understandable now. > > Let us define A and B as kxk matrices. C is the output (matrix), which I try > to calculate for differnt i values. > > So for example: I want to calucla

Re: [R] Parts of Speach Tagging

2013-08-24 Thread David Winsemius
On Aug 24, 2013, at 3:41 PM, Siddharth Arun wrote: > I was using tagPOS function from openNLP package for parts-of-speach. Now > the package is updated and the function is not present. Any suggestions how > to do it now ? Ask the maintainer? maintainer(openNLP) -- David. > David Winsemius

[R] Parts of Speach Tagging

2013-08-24 Thread Siddharth Arun
I was using tagPOS function from openNLP package for parts-of-speach. Now the package is updated and the function is not present. Any suggestions how to do it now ? Thanks for your help. -- Regards, Siddharth Arun, Contact No. - +91 8880065278 [[alternative HTML version deleted]]

Re: [R] how to apply summation sign formula to R

2013-08-24 Thread Sebastian Hersberger
Thanks. I restate my problem/question and hope its better understandable now. Let us define A and B as kxk matrices. C is the output (matrix), which I try to calculate for differnt i values.  So for example: I want to caluclate the matrix C for the value i=10: Therefore, I set: i <- c(0, 1, 2,

[R] How to shape the dataframe for mlogit function

2013-08-24 Thread Giovanni Mancuso
Dear All, I have a question concerning the mlogit function. In my experimental design, I collect 80 trials for each participant. The subjects are asked to provide the answer by choosing among 4 different alternatives. Now I would like to model the choices of my participants as a function of ni

Re: [R] how to apply summation sign formula to R

2013-08-24 Thread David Winsemius
On Aug 24, 2013, at 6:37 AM, Sebastian Hersberger wrote: > Hi all > > I have a short question relating to the usage of the summation sign in R. > > Let's define A and B as two kxk matrice. > My goal is to calculate the matrix C for the periods from 1 to 200 (n=1-200). > > C^(n) = Σ_(j=1)^n [(Σ

Re: [R] From POSIXct to numeric and back with time zone

2013-08-24 Thread David Winsemius
On Aug 23, 2013, at 1:22 PM, Jeff Newmiller wrote: > I disagree with the characterization that setting TZ to anything but UTC > yields confusing results. If your time strings do not specify a time offset, > then TZ will be assumed, and if the assumed time zone accounts for daylight > savings a

[R] 'plm' package problem

2013-08-24 Thread londonphd
Hi, I ran 3 plm regressions (fixed effects) : twoways, individual and time effects are added. I noticed that I am getting the same results in each model. I expect the results to be different given the varying effects introduced in each model. Can you please help sort this out, please? or Am I ru

Re: [R] lags of a variable, with a factor

2013-08-24 Thread Charles Berry
Jim Lemon bitwrit.com.au> writes: > > On 08/24/2013 04:16 AM, Michael Friendly wrote: > > For sequential analysis of sequences of events, I want to calculate a > > series of lagged > > versions of a (numeric or character) variable. The simple function below > > does this, > > but I can't see how

[R] Selection of regressors

2013-08-24 Thread beginner
I have a question about the package leaps which I am using for model selection. I would like to compare 4 different selection methods: forward, backward, stepwise and best subset. I used the code below: library(leaps) forward <- regsubsets(Response ~.,data = mydata, method = "forward", nbest=1) b

Re: [R] just a small variable-naming question

2013-08-24 Thread arun
Hi, You could use ?paste() colnames(myData)<-paste(colnames(myData),paste0("var",1:3),sep="_")  myData #  col1_var1 col2_var2 col3_var3 #1 1 2 3 #2 2 3 4 #3 3 4 5 A.K. - Original Message - From: Richard Sherman To:

[R] just a small variable-naming question

2013-08-24 Thread Richard Sherman
Hi all, If I have this little data set: > myData <- data.frame(col1 = 1:3, col2 =2:4, col3 = 3:5) > myData col1 col2 col3 1123 2234 3345 and I want to add (not replace) the names var1, var2, var3 to the existing col1, col2, col3, what is the right way to d

Re: [R] Divide the data into sub data on a particular condition

2013-08-24 Thread arun
Hi, Use ?split() #dat1 is the dataset: lst1<- split(dat1,dat1$BaseProd) lst1 #$`2231`  # BaseProd  CF OSA #1 2231 0.5 0.7 #2 2231 0.8 0.6 #3 2231 0.4 0.8 # #$`2232`  # BaseProd CF OSA #4 2232  1   2 #5 2232  3   1 # #$`2233`  # BaseProd  CF OSA #6 2233 0.9 0.5 #7 2233 0.

[R] fitted

2013-08-24 Thread alR
I have fitted a multiple regression model to the row of a matrix using lm: ft<-lm(datos[i, ]-r1 + r2+ r3 + r4,keep.data = TRUE,model=TRUE) If I use fitted(ft) I get the list of fitted values (which I think is the mean of the fitted values corresponding to each of the explanatory variables (r1, r2

[R] how to apply summation sign formula to R

2013-08-24 Thread Sebastian Hersberger
Hi all I have a short question relating to the usage of the summation sign in R. Let's define A and B as two kxk matrice. My goal is to calculate the matrix C for the periods from 1 to 200 (n=1-200). C^(n) = Σ_(j=1)^n [(Σ_(i=1)^(j-1) A^i ) B (Σ_(i=1)^(j-1) A^i)’ ] How has that to be implemente

[R] EdgeR annotation

2013-08-24 Thread Robin Mjelle
after updating R and edgeR I lost the annotations in the final Diff.Expressed matrix (toptags) when running the edgeR pipeline. How do I get the row.names from the data matrix into the topTag-matrix? data <- read.table("KO_and_WT_Summary_miRNA_Expression.csv", row.names=1, sep="", header=T) keep

Re: [R] how to combine apply and which or alternative ways to do so

2013-08-24 Thread John Kane
Bon jour, I am not clear exactly what you are looking for. When I first read the email I though you wanted to know if something in vector 2 was in vector 1 but after rereading it I am not sure. If I was correct the first time I think something like vector2 %in% vector1 will do it. If I am

Re: [R] lags of a variable, with a factor

2013-08-24 Thread Jim Lemon
On 08/24/2013 04:16 AM, Michael Friendly wrote: For sequential analysis of sequences of events, I want to calculate a series of lagged versions of a (numeric or character) variable. The simple function below does this, but I can't see how to generalize this to the case where there is also a facto

Re: [R] Replace two nested loop with an apply kind of function

2013-08-24 Thread Mark Sharp
The only reason to use one of the apply family of functions is because the idiom makes your code more clear. I do not see how that would be the case here. The apply functions are not typically any faster. If you really need speed the Rcpp package is very easy to use. Mark On Aug 23, 2013, at 3:

Re: [R] Replace two nested loop with an apply kind of function

2013-08-24 Thread Mark Sharp
On Aug 23, 2013, at 3:33 PM, gi...@metu.edu.tr wrote: Dear R users, I am confused with the usage of apply kind of functions instead of nested loops. Let me illustrate my problem, I have an array,named C, with dimesions c(nr,nr,nt*n). I want to fill in a Tmat array acc

Re: [R] From POSIXct to numeric and back with time zone

2013-08-24 Thread Daniel Haugstvedt
On Fri, Aug 23, 2013 at 7:12 PM, David Winsemius wrote: > > On Aug 23, 2013, at 3:12 AM, Daniel Haugstvedt wrote: > > > I am replying to my own question in case someone else finds this tread > and needs help with the same problem. Thanks to Mark Leeds for helping me > on my way. Any errors or flaw