Re: [R] Fwd: Matrix Constraints in R Optim

2016-06-21 Thread Priyank Dwivedi
Thank you Jeff. It seems to definitely solve it but the "total_error" is very high. Around 399. I also tried with the method = "L-BFGS-B". Still the error is around 399. How can we reduce it? Priyank On 21 June 2016 at 12:18, Jeff Newmiller wrote: > The size of this r

Re: [R] Fwd: Matrix Constraints in R Optim

2016-06-20 Thread Priyank Dwivedi
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) sols On 17 June 2016 at 16:55, Jeff Newmiller wrote: > Your code is corrupt because you failed to send your email in plain text > format. > > You also don't appear to have all data needed to reproduce the problem. Use > the dput function to

[R] Fwd: Matrix Constraints in R Optim

2016-06-17 Thread Priyank Dwivedi
By mistake, I sent it earlier to the wrong address. -- Forwarded message -- From: Priyank Dwivedi Date: 17 June 2016 at 14:50 Subject: Matrix Constraints in R Optim To: r-help-ow...@r-project.org Hi, Below is the code snippet I wrote in R: The basic idea is to minimize error

Re: [R] Output formatting in Latex and R

2012-03-19 Thread priyank
Use the eol="\n\n" option. The records should have a 2 line space. -- View this message in context: http://r.789695.n4.nabble.com/Output-formatting-in-Latex-and-R-tp4483631p4485457.html Sent from the R help mailing list archive at Nabble.com. __ R-help

Re: [R] Output formatting in Latex and R

2012-03-19 Thread priyank
Col3 <- unique(Msg17$V3) LCol3 <- length(Col3) for (i in 1:LCol3) { print(paste("Column", Col3[i])) write.table(Msg17[Msg17$V3==Col3[i],-3], row.names=F, col.names=F,quote=F) # If you R implementation does not accept 'F', use 'FALSE' } -- View this message in context: http://r.789695.n4.nabbl

Re: [R] How to Group Categorical data in R?

2012-03-17 Thread priyank
How about this --? ##Assumes you have read your data into data frame "Msg17" ## Capture unique values from data file's Column 3 Col3 <- unique(Msg17$V3) #Captures length of the unique value vector LCol3 <- length(Col3) ## Loop to sequentially select rows with the unique Col3 values for (i in 1: