Re: [R] system() command in R

2011-04-10 Thread rasanpreet kaur suri
Thank you all for the suggestions. I've been trying different things to make this work. Mike I did try what you suggested . It would work normally But i guess here the problem is my local server itself. It by default takes time to start and nothing I do is helping . So I came up with the idea to c

[R] MLE where loglikelihood function is a function of numerical solutions

2011-04-10 Thread Kristian Lind
Hi there, I'm trying to solve a ML problem where the likelihood function is a function of two numerical procedures and I'm having some problems figuring out how to do this. The log-likelihood function is of the form L(c,psi) = 1/T sum [log (f(c, psi)) - log(g(c,psi))], where c is a 2xT matrix of

[R] maxLik package.

2011-04-10 Thread hello bye
Dear Sir/ Madam,   I have some enquiry in R about maxLik package where, in this package we have the usage  maxLik(logLik, grad, hess, start, method, iterlim, print.level)   when I used this with print.level equals to 3 I could have estimates of parameters at each iteration but I do not know how

[R] Duncan's multiple range test

2011-04-10 Thread mustafabinar
Hello;   I don't find quantile function of duncan's multiple range test.   Example   quantile function of Tukey test is qtukey(...). What is quantile function for Duncan's multiple range test? If you help me, i am very happy.   Thanks. Facebook ve Twitter hesaplarýný te

[R] Multinomial Logit Model with lots of Dummy Variables

2011-04-10 Thread ghpow1
Hi All, I am attempting to build a Multinomial Logit model with dummy variables of the following form: Dependent Variable : 0-8 Discrete Choices Dummy Variable 1: 965 dummy varsgh...@student.monash.edu.augh@gp1.com Dummy Variable 2: 805 dummy vars The data set I am using has the dummy columns p

Re: [R] Adding text labels to lattice plots with multiple panels

2011-04-10 Thread Jeff Stevens
Hi Peter, Thanks for the solutions. The only problem now is that I have duplicate values in my labels that are removed by the duplicated function. Perhaps a better example of the labels vector would be: lab <- c(1,2,4,4,6,6) Your first version would maintain the second 4 (because they are in di

[R] Fwd: open.exe Virus W32.ATRAPS

2011-04-10 Thread Costas Vorlow
Hello, I am not sure if this is the correct mailing list to send this email... I was trying to install on windows XP latest R-2.12.2 and my unvirus program (Immunet 3.0) reports a virus at open.exe while this is unpacked: W32.ATRAPS Has anyone come across the same problem? Best, Costas

[R] Help in cluster MPI and R

2011-04-10 Thread Ronaldo Reis Junior
Hi, ImountedanMPIclusterwithdebian.I installedthepackagesnecessarytorunusingRinthiscluster,butunsuccessfully, thefunctionsofexampleswere runbutonlyin theserver processorin the cluster.I thinkitlacks an essentialconfigurationofR packagesfor him tocommunicatewith thecluster.Anyoneknowanymorebasi

Re: [R] Multinomial Logit Model with lots of Dummy Variables

2011-04-10 Thread Jeremy Hetzel
If you are just looking to collapse the dummy variables into two factor variables, the following will work. ## Generate some example data set.seed(1234) n <- 100 # Generate outcome outcome <- rbinom(n, 3, 0.5) colnames(exposures) <- paste("V", seq(1:10), sep = "") #Generate dummy variables for A

Re: [R] set locale information in R

2011-04-10 Thread raji sankaran
Hi Uwe, Thank you very much.. That worked :) Regards, Raji 2011/4/9 Uwe Ligges > Try > > Sys.setenv("LANGUAGE"="Fr") > > Uwe Ligges > > > On 07.04.2011 10:29, Raji wrote: > >> Hi R-helpers, >> >> Is it possible to localise the error messages/warnings that comes from >> R.My application tak

Re: [R] Adding text labels to lattice plots with multiple panels

2011-04-10 Thread Peter Ehlers
On 2011-04-10 04:50, Jeff Stevens wrote: Hi Peter, Thanks for the solutions. The only problem now is that I have duplicate values in my labels that are removed by the duplicated function. Perhaps a better example of the labels vector would be: lab<- c(1,2,4,4,6,6) Your first version would mai

[R] howto calculate column means in data frame

2011-04-10 Thread Maas James Dr (MED)
Long story short, I have a big iterative procedure that produces a long list of data.frames such as the one called "results" here. Is there an easy way to produce a similar list of data.frames comprised of the mean of each of the columns in results, such that it ends up like the one I've shown i

Re: [R] howto calculate column means in data frame

2011-04-10 Thread Joshua Wiley
Hi Jim, Using ?lapply with ?colMeans should do the trick. Here is a little sample: eg <- list(mtcars, mtcars) # mtcars data frame twice in a list resultsmean <- lapply(eg, colMeans) # calculate column means for each element of "eg" resultsmean # show the results Hope this helps, Josh On Sun,

Re: [R] howto calculate column means in data frame

2011-04-10 Thread Berend Hasselman
jamaas wrote: > > Long story short, I have a big iterative procedure that produces a long > list of data.frames such as the one called > "results" here. Is there an easy way to produce a similar list of > data.frames comprised of the mean of each of the > columns in results, such that it ends up

Re: [R] Orthoblique rotation on eigenvectors (SAS VARCLUS)

2011-04-10 Thread Frank Harrell
See the varclus function in the Hmisc package. Frank Axel Urbiz wrote: > > Hi All, > > I'd like to build a package for the community that replicates the output > produced by SAS "proc varclus". According to the SAS documentation, the > first few steps are: > > 1. Find the first two principal c

Re: [R] MLE where loglikelihood function is a function of numerical solutions

2011-04-10 Thread Albyn Jones
Hi Kristian The obvious approach is to treat it like any other MLE problem: evaluation of the log-likelihood is done as often as necessary for the optimizer you are using: eg a call to optim(psi,LL,...) where LL(psi) evaluates the log likelihood at psi. There may be computational shortcuts

Re: [R] MLE where loglikelihood function is a function of numerical solutions

2011-04-10 Thread Albyn Jones
to clarify: by "if you knew that LL(psi+eps) were well approximated by LL(psi), for the values of eps used to evaluate numerical derivatives of LL. " I mean the derivatives of LL(psi+eps) are close to the derivatives of LL(psi), and perhaps you would want the hessian to be close as well. alb

[R] list to data frame

2011-04-10 Thread Franklin Tamborello II
I need to make a data frame out of the data that I currently have in a list. This works, but is ugly: ineffData<-rbind(ineffFilesList[[1]], ineffFilesList[[2]], ineffFilesList[[3]], ineffFilesList[[4]], ineffFilesList[[5]], ineffFilesList[[6]], ineffFilesList[[7]], ineffFilesList[[8]], ineffFile

Re: [R] list to data frame

2011-04-10 Thread Jorge Ivan Velez
Hi Franklin, Try do.call(rbind, ineffFilesList) See ?do.call for more details. HTH, Jorge On Sun, Apr 10, 2011 at 2:01 PM, Franklin Tamborello II <> wrote: > I need to make a data frame out of the data that I currently have in a > list. This works, but is ugly: > ineffData<-rbind(ineffFilesL

Re: [R] Fwd: open.exe Virus W32.ATRAPS

2011-04-10 Thread peter dalgaard
On Apr 10, 2011, at 15:10 , Costas Vorlow wrote: > Hello, > > I am not sure if this is the correct mailing list to send this email... > > I was trying to install on windows XP latest R-2.12.2 and my unvirus program > (Immunet 3.0) reports a virus at open.exe while this is unpacked: > > W32.AT

Re: [R] By function

2011-04-10 Thread Raoni Rodrigues
Liviu, Thanks for your attention and help! Sorry for attached csv file, I didn't read R-Help Posting guide careful. Another R-helper thaught me use de dput() function, and this output are in email's end. Your correction in my code works pretty well!! Now I can understand a little more how the R

Re: [R] Adding text labels to lattice plots with multiple panels

2011-04-10 Thread Peter Ehlers
On 2011-04-10 12:19, Jeff Stevens wrote: Many thanks, Peter. This works brilliantly, and I prefer to have the labels assigned outside of panel function as well. Cheers, Jeff Small add-on: It's probably best to ensure that the labels are of type character, not factor. Peter [...snip...] ___

Re: [R] list to data frame

2011-04-10 Thread Philipp Pagel
On Sun, Apr 10, 2011 at 06:01:39PM +, Franklin Tamborello II wrote: > I need to make a data frame out of the data that I currently have in > a list. This works, but is ugly: > ineffData<-rbind(ineffFilesList[[1]], ineffFilesList[[2]], > ineffFilesList[[3]], ineffFilesList[[4]], ineffFilesList[[

Re: [R] Converting edgelist to symmetric matrix

2011-04-10 Thread Mike Marchywka
> Date: Sat, 9 Apr 2011 14:34:28 -0700 > From: kmshafi...@yahoo.com > To: r-help@r-project.org > Subject: [R] Converting edgelist to symmetric matrix > > Hi, > I have network data in the form of a couple of edgelists containing weights in > the format "

[R] Fitting controlled released data

2011-04-10 Thread EmaDaCuz
Hi, I am new to the forum/mailing list. I have been using R for a while and I find it incredible. I was just wondering whether someone has ever written a library to calculate the best fit of experimental data to some controlled release models, having only the release cumulative drug release at giv

[R] Question about levels/as.numeric

2011-04-10 Thread Thibault Vatter
Hi, I am still new to R and this is my first post on this mailing-list. I have two .csv (each one being a column of real numbers) coming from the same database (the first one is just longer than the second) and I read them in R the following way: returns <- read.csv("test.csv", header = FALSE)

[R] Password-protect R script files

2011-04-10 Thread Vijayan Padmanabhan
There was a question in R forum very long time back.. on how to protect R Script files from inadvertent editing by users. There is a way to do this from within R, atleast in Windows XP I have tried this and it certainly works , The method is very different from the OS based folder protection rout

Re: [R] Adding text labels to lattice plots with multiple panels

2011-04-10 Thread Jeff Stevens
Many thanks, Peter. This works brilliantly, and I prefer to have the labels assigned outside of panel function as well. Cheers, Jeff On Sun, Apr 10, 2011 at 5:18 PM, Peter Ehlers wrote: > On 2011-04-10 04:50, Jeff Stevens wrote: >> >> Hi Peter, >> >> Thanks for the solutions.  The only problem

[R] About Tinn-R

2011-04-10 Thread Marcos Prunello
Hi everybody!! I don`t know if it is correct to make a question about R and Tinn-R in this mailing-list, but I need some help with a problem for which I don't find a solution anywhere. I have Tinn-R 2.3.5.2 in my notebook and I always used it with no problems, until a few days ago when this si

Re: [R] Question about levels/as.numeric

2011-04-10 Thread Petr Savicky
On Sun, Apr 10, 2011 at 05:47:59PM +0200, Thibault Vatter wrote: > Hi, > > I am still new to R and this is my first post on this mailing-list. > > I have two .csv (each one being a column of real numbers) coming from the > same database (the first one is just longer than the second) and I read th

[R] count number of TRUEs in each row

2011-04-10 Thread Wendy
Hi all, I have a huge matrix of TRUE/FALSE table like following, and I want to count the number of TRUEs in each row. Instead of looping through each row and do length(Z[Z==TRUE]), I am wondering if there is an easier way of doing this. [,1] [,2][,3] [1,]TRUE FALSE FALSE [2,]FALSE

Re: [R] count number of TRUEs in each row

2011-04-10 Thread Peter Langfelder
On Sun, Apr 10, 2011 at 2:24 PM, Wendy wrote: > Hi all, > > I have a huge matrix of TRUE/FALSE table like following, and I want to count > the number of TRUEs in each row. Instead of looping through each row and do > length(Z[Z==TRUE]), I am wondering if there is an easier way of doing this. > >  

Re: [R] count number of TRUEs in each row

2011-04-10 Thread Tóth Dénes
Hi Wendy, try this: Z <- matrix(runif(1000)>0.5,10,100) rowSums(Z) HTH, Denes > Hi all, > > I have a huge matrix of TRUE/FALSE table like following, and I want to > count > the number of TRUEs in each row. Instead of looping through each row and > do > length(Z[Z==TRUE]), I am wondering if t

Re: [R] Question about levels/as.numeric

2011-04-10 Thread Peter Ehlers
Thibault, Your questions indicate that you would benefit enormously from reading 'An Introduction to R'. A very useful function is str(). Understanding the concept of "factors" is crucial in R. "Checking" anything with Excel is never much use. Peter Ehlers On 2011-04-10 08:47, Thibault Vatter

Re: [R] Adding margin text to lattice graphics

2011-04-10 Thread baptiste auguie
Yes, very sorry about this -- I had subconsciously ignored the hypothetical possibility that anyone wouldn't have ggplot2 loaded in their .Rprofile ;) Replacing mpg with beaver1 (datasets) should be more reproducible. That being said, I was told off-list that this is not answering at all the ques

Re: [R] Help with basic loop

2011-04-10 Thread Daniel Malter
The loop is correct, you just need to make sure that your result is computed and stored as the n-th element that is returned by the loop. Pick up any manual of R, and looping will be explained there. Also, I would recommend that you draw a random number for every iteration of the loop. Defining the

Re: [R] For->lapply->parallel apply

2011-04-10 Thread Steve Lianoglou
Hi, On Sat, Apr 9, 2011 at 5:03 AM, Alaios wrote: > Dear all, > I would like to ask your help understand the subsequent steps for making my > program faster. > > The following code: > Gauslist<-array(data=NA,dim=c(dimx,dimy,dimz)) > for (i in c(1:dimz)){ >    print(sprintf('Creating the %d map',

Re: [R] About Tinn-R

2011-04-10 Thread Steve Lianoglou
Hi, On Sun, Apr 10, 2011 at 5:13 PM, Marcos Prunello wrote: > Hi everybody!! > > I don`t know if it is correct to make a question about R and Tinn-R in this > mailing-list, but I need some help with a problem for which I don't find a > solution anywhere. If you go to Tinn-R's "Support" section

Re: [R] About Tinn-R

2011-04-10 Thread Kenneth Roy Cabrera Torres
Dear Marcos: Did you try this version (version 2.3.7.1)? http://sourceforge.net/projects/tinn-r/ Does is show the same messages? What R version are you using? It seems more a problem with the OS that with R or Tinn-R. When you uninstall Tinn-R, do you check any file left in the folder: C:/Docu

[R] rtmvt

2011-04-10 Thread statfan
I have been using the rtmvt function in the {tmvtnorm} package i'm getting the warning: "Acceptance rate is very low and rejection sampling becomes inefficient. Consider using Gibbs sampling." but i AM specifying the gibbs algorithm!!: rtmvt(M, mean=q[,,i,j], sigma=((u[i,j] + nu[i])/(p+nu[i]))*d

Re: [R] count number of TRUEs in each row

2011-04-10 Thread Hasan Diwan
Ms Qiao, On 10 April 2011 14:24, Wendy wrote: > I have a huge matrix of TRUE/FALSE table like following, and I want to > count > the number of TRUEs in each row. Instead of looping through each row and do > length(Z[Z==TRUE]), I am wondering if there is an easier way of doing this. > > [,1

Re: [R] Question about levels/as.numeric

2011-04-10 Thread Rolf Turner
On 11/04/11 10:08, Peter Ehlers wrote: "Checking" anything with Excel is never much use. Fortune? cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Specifying the color of points and the plot symbol to be used on a graph

2011-04-10 Thread John Sorkin
R 2.12.2 Windows 7 I would like to know how to specify the color used in plotting points on a scatter plot, generated using plot(x,y) and how I can specify the particular symbol used. I would like, for example, to plot some points as blue circles and other points a red squares. If someone will

Re: [R] Specifying the color of points and the plot symbol to be used on a graph

2011-04-10 Thread Peter Alspach
Tena koe John If I understand you correctly I think it is easier than that: plot(x, y, col=yourColourVariate, pch=yourPchVariate) where yourColourVariate and yourPchVariate are numeric variates of the same lengths as x and y (recycling occurs). Actually the former can be a character variate o

Re: [R] In svm(), how to connect quantitative prediction result to categorical result?

2011-04-10 Thread Steve Lianoglou
Hi Yunfei, On Fri, Apr 8, 2011 at 8:35 PM, Li, Yunfei wrote: > Hi, > > I am studying using SVM functions of e1071 package to do prediction, and I > found during the training data are "factor" type, then svm.predict() can > predict data directly by categories; but if response variables are > "n

[R] predict ordered regresssion

2011-04-10 Thread Joe P King
Is there a way to get confidence intervals around an ordered regression like polr() in the MASS package? --- Joe King, M.A. Ph.D. Student University of Washington - Seattle 206-913-2912 j...@joepking.com --

Re: [R] Specifying the color of points and the plot symbol to be used on a graph

2011-04-10 Thread John Sorkin
Thank you! An elegant solution to my problem! John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-71

Re: [R] predict ordered regresssion

2011-04-10 Thread Prof Brian Ripley
On Sun, 10 Apr 2011, Joe P King wrote: Is there a way to get confidence intervals around an ordered regression like polr() in the MASS package? Please don't both ask the author directly *and* post to a forum. The answer is the same as the one I sent you directly. - For what do you want CIs,

Re: [R] Question about levels/as.numeric

2011-04-10 Thread Petr Savicky
On Sun, Apr 10, 2011 at 05:47:59PM +0200, Thibault Vatter wrote: > Hi, > > I am still new to R and this is my first post on this mailing-list. > > I have two .csv (each one being a column of real numbers) coming from the > same database (the first one is just longer than the second) and I read th

Re: [R] random sampling with levels and with replacement

2011-04-10 Thread taby gathoni
Andreas, Thanks alot. I  combined below and other suggestions given on r-help and it worked. --- On Fri, 4/8/11, Andreas Borg wrote: From: Andreas Borg Subject: Re: [R] random sampling with levels and with replacement To: tab...@yahoo.com Cc: "R help" Date: Friday, April 8, 2011, 11

Re: [R] help question

2011-04-10 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 08.04.2011 18:24:37: > On 08/04/2011 9:20 AM, DEBERGH Patrick wrote: > > hello > > > > I am at the very beginneing of using the R program > > > > I just don't understand how one can save a programfile > > > > For exemple, if I type in R 23+456 and want

Re: [R] Question about levels/as.numeric

2011-04-10 Thread Thibault Vatter
Thanks Kent and Petr, the problem was indeed the "C"/missing value that I had to convert! Thanks Peter too, the "factor" explanation will also be quite usefull for further work. Best regards, Thibault On 11 April 2011 03:48, Rolf Turner wrote: > On 11/04/11 10:08, Peter Ehlers wrote: > > > >