Re: [R] Speed up R
> -Original Message- > From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] > The advantage of dual processors is that you can use the > machine for several things at once, including multiple R > jobs. For example, when I am doing package checking I am > typically checking 4 packages at once on a dual processor > machine to get continuous high utilization. I would like to thank very much everybody taking part in discussion. Does an answer above suggest that I can open two R console and do simulations simultaneously? If so, all simulations take more or less 1/2 times - or much less then doing it in turn? During our discussion one mentioned that RAM is important. But in my computing I do not use up more then 500 MB. I have 786 MB it means (probably) that I have enough. Am I right? Best, Rob > I have little doubt that a Pentium 4 would be much slower > than the others. > > I've just bought an Intel Core 2 Duo E6600 primarily to run > 64-bit Linux, but it also has Vista 64 and XP (32-bit) on it. > I don't think the differences between the current dual-core > chips are really enough to worry about: they will all look > slow in less than a year. > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Speed up R
Dear R Users, I hope that there is someone who has an experience with a problem that I describe below and will help me. I must buy new desktop computer and I'm wondering which processor to choose if my only aim is to speed up R. I would like to reduce a simulation time - sometimes it takes days. I consider buying one of them (I'm working under Win XP 32 bit): 1. Intel Core2 Duo E6700 2.67 GHz 2. Dual-Core Intel Xeon processor 3070 - 2,66 GHz 3. AMD Athlon 64 X2 6000+ Or simple Pentium 4? I'm very confused because I'm not sure whether R takes advantage dual-core or not. If not, probably Athlon would be better, wouldn't be? I would appreciate any help. Rob __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help comparing two median with R
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Jim Lemon > Sent: Tuesday, April 17, 2007 12:37 PM > To: Pedro A Reche > Cc: r-help@stat.math.ethz.ch > Subject: Re: [R] help comparing two median with R > > Pedro A Reche wrote: > > Dear R users, > > I am new to R and I would like to ask your help with the following > > topic. I have three sets of numeral data, 2 sets are paired and a > > third is independent of the other two. For each of these sets I have > > obtained their basic statistics (mean, median, stdv, range ...). > > Now I want to compare if these sets differ. I could compare > the mean > > doing a basic T test . However, I was looking for a test to compare > > the medians using R. If that is possible I would love to > hear the > > specifics. > > Hi Pedro, > You can use the Mann-Whitney test ("wilcox" with two > samples), but you would have to check that the second and > third moments of the variable distributions were the same, I think. > > Jim Use Mann-Whitney U test, but remember about 2 assumption: 1. samples come from continuous distribution (there are no tied obserwations) 2. distributions are identical in shape. It's very similar to t-test but Mann-Whitney U test is not as affected by violation of the homogeneity of variance assumption as t-test is. Rob __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] software comparison
Dear R Users, May be you are interested in an article that compares 9 statistical softwares (including R). Any comments are appreciate. Article: Keeling, Kellie B.; Pavur, Robert J."A comparative study of the reliability of nine statistical software packages" Computational Statistics and Data Analysis, Volume: 51, Issue: 8, 2007, pp. 3811-3831 Abstract The reliabilities of nine software packages commonly used in performing statistical analysis are assessed and compared. The (American) National Institute of Standards and Technology (NIST) data sets are used to evaluate the performance of these software packages with regard to univariate summary statistics, one-way ANOVA, linear regression, and nonlinear regression. Previous research has examined various versions of these software packages using the NIST data sets, but typically with fewer software packages than used in this study. This study provides insight into a relative comparison of a wide variety of software packages including two free statistical software packages, basic and advanced statistical software packages, and the popular Excel package. Substantive improvements from previous software reliability assessments are noted. Plots of principal components of a measure of the correct number of significant digits reveal how these packages tend to cluster for ANOVA and nonlinear regression. Best, Rob __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] clear console
Gabor thank you very much. It works wonderful. Rob > -Original Message- > From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 05, 2007 1:39 PM > To: Robert McFadden > Cc: r-help@stat.math.ethz.ch > Subject: Re: [R] clear console > > Check out: > > http://tolstoy.newcastle.edu.au/R/help/06/02/21634.html > > On 4/5/07, Robert McFadden <[EMAIL PROTECTED]> wrote: > > Hi R Users, > > > > In Windows I can clear console using CTRL-L, but can I do this by > > certain command in my programs? e.g > > > > for (i in 1:10){ > > > > something > > > > clear console > > > > } > > > > > > > > Best, > > > > Rob > > > > > > > >[[alternative HTML version deleted]] > > > > __ > > R-help@stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] clear console
Hi R Users, In Windows I can clear console using CTRL-L, but can I do this by certain command in my programs? e.g for (i in 1:10){ something clear console } Best, Rob [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Device drivers - png()/jpeg()
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Schmitt, Corinna > Sent: Monday, April 02, 2007 2:58 PM > To: r-help@stat.math.ethz.ch > Subject: [R] Device drivers - png()/jpeg() > > Hallo R-experts, > > I produced a R graphic with the help of the following commands: > > plot(0:4,0:4, type = "n", xlab = "X-Werte", ylab = "Y-Werte") > points(rnorm(100), rnorm(100), col = "black") locator(2, > type= "l") locator(2, type = "l", col = "red") > > I could display this graphic by using windows() before > entering those commands. Now I want to save this graphic as > PNG file and JPEG file. I studied the online-help and the > manuals extensively but could not find a solution. > > Can anyone tell me the corresponding command in detail? png(file="plot_names.png") # for jpeg and pdf use: jpeg(file="plot_names.jpeg") and pdf((file="plot_names.pdf") plot(0:4,0:4, type = "n", xlab = "X-Werte", ylab = "Y-Werte") points(rnorm(100), rnorm(100), col = "black") locator(2, type= "l") locator(2, type = "l", col = "red") dev.off() Rob __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] merge words=data name
> -Original Message- > From: Duncan Murdoch [mailto:[EMAIL PROTECTED] > > eval(parse(text=my.data)) > I would like to thank everybody very much for help, but especially for Duncan - it works wonderful. Rob __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] merge words=data name
I would like to merge two parts of words to get a name of the data. First M3$N (invariable) and second is a number from 0001 to 3003 - M3$N0001,M3$N0002,...,M3$N3003. For example if I do it like this: my.data <- paste("M3$N",2456,sep="") I get > my.data [1] "M3$N2456" But I want to get something equivalent to my.data<- M3$N2456 Is there any way to do it? It's important, because the second part are randomly chosen. (The data that I would like to extract are in package Mcomp.) Thanks in advance, Rob __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] matrix - change values
I would like to thanks everybody for helpful suggestion. Rob Od: [EMAIL PROTECTED] Do: r-help@stat.math.ethz.ch Data: 14 grudnia 2006 15:01 Temat: [R] matrix - change values > Dear R Users, > I have a matrix A, and I want to change every value of this matrix if these > values are greater than an assuming value. For a vector it is simple, e.g. > a<-c(1:10); a[a>5]<-0. > Of course, I can change matrix to vector, assign a value then change vector > to matrix. But does there exist simpler way? > Any suggestion are appreciate. > Rob > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] matrix - change values
Dear R Users, I have a matrix A, and I want to change every value of this matrix if these values are greater than an assuming value. For a vector it is simple, e.g. a<-c(1:10); a[a>5]<-0. Of course, I can change matrix to vector, assign a value then change vector to matrix. But does there exist simpler way? Any suggestion are appreciate. Rob __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Firefox extension fo "R Site Search"
May be it's not a bug, but I tried to search for the package rpanel and I was not find. At the r-project's site that package is available. How to explain it? Rob __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Firefox extension fo "R Site Search"
It's excellent. Good work. Robert __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] arima() function - issues
Seasonal ARIMA is in the package: http://www.robhyndman.info/Rlibrary/forecast/index.html If you are interested in time series look at http://zoonek2.free.fr/UNIX/48_R/all.html Hope this help Robert > -Original Message- > From: [EMAIL PROTECTED] [mailto:r-help- > [EMAIL PROTECTED] On Behalf Of Sachin J > Sent: Wednesday, July 26, 2006 9:20 PM > To: R-help@stat.math.ethz.ch > Subject: [R] arima() function - issues > > Hi, > > My query is related to ARIMA function in stats package. > While looking for the time series literature I found following link which > highlights discrepancy in "arima" function while dealing with > differenced time series. Is there a substitute function similar to > "sarima" mentioned in the following website implemened in R? Any pointers > would > be of great help. > > http://lib.stat.cmu.edu/general/stoffer/tsa2/Rissues.htm > > Thanx in advance. > Sachin > > > > - > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] change the name of file
Great, little change and it works. Thank you. Look for (i in 1:50){ x<-matrix(runif(100, min=0,max=1),nrow=5,ncol=20) write(t(x),file=paste("data_",i,".txt",sep=""),ncolumns=5,sep="\t") } > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, July 24, 2006 11:16 AM > To: Robert Mcfadden > Subject: Re: [R] change the name of file > > >From: Robert Mcfadden <[EMAIL PROTECTED]> > >Date: 2006/07/24 Mon AM 04:06:38 CDT > >To: r-help@stat.math.ethz.ch > >Subject: [R] change the name of file > > i think file=paste("data_", i,"txt",sep="") > should work but someone else will probably > have a better solution. if you try my idesa, > check it because i haven't tested it. > > > > > > >Dear R Users, > >Is it possible to make file names dependent on a changing variable? > >For instance. I generate random numbers in a loop and at each iteration I > >want data to write to file (I do not want to write everything in one file > >using 'append'): > > > >for (i in 1:50){ > >x<-matrix(runif(100, min=0,max=1),nrow=5,ncol=20) > >Write(t(x),file="Data_i.txt",ncolumns=5,sep="\t") > >} > > > >Of course file name Data_i.txt will be the same for changing i, > >unfortunately. > > > >Any suggestion would be appreciate > >Robert > > > >__ > >R-help@stat.math.ethz.ch mailing list > >https://stat.ethz.ch/mailman/listinfo/r-help > >PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > >and provide commented, minimal, self-contained, reproducible code. > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] change the name of file
Dear R Users, Is it possible to make file names dependent on a changing variable? For instance. I generate random numbers in a loop and at each iteration I want data to write to file (I do not want to write everything in one file using 'append'): for (i in 1:50){ x<-matrix(runif(100, min=0,max=1),nrow=5,ncol=20) Write(t(x),file="Data_i.txt",ncolumns=5,sep="\t") } Of course file name Data_i.txt will be the same for changing i, unfortunately. Any suggestion would be appreciate Robert __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] R shutdown
Dear R Users, I run simulation that takes very long time (R 2.2.1, Win XP pro., Rgui SDI mode, editor Tinn-R). It's happened that R shuts down and Windows display the message: Rgui.exe makes an error and the application will shut down. Unfortunately everything I lost. Below I paste the message that is created when error appear. Maybe You as an expert will figure out what is happening to me. Best, Robert McFadden __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] get rid of error in Factor Analysis
Dear All, I wrote a program and there is a loop. At each iteration I use maximum likelihood factor analysis (?factanal). Output of factor analysis I use later (in this loop). Unfortunately from time to time I get an error message (I paste it below) and everything is stopped. Is it possible to write a condition that if error appears in factor analysis (FA), change input data for FA and do it again? Example for (i in 1:1000){ FA<-factanal(data,factor=3) If error appears change data to data2 and do factor analysis again #rest of the program } Best, Robert Error in optim(start, FAfn, FAgr, method = "L-BFGS-B", lower = lower, : L-BFGS-B needs finite values of 'fn' In addition: Warning message: NaNs produced in: log(x) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] rbind, array
Hello, I'm looping something like rbind for array. More precisely: if I define y<-array(c(1:27),dim=c(3,3,3)) and I take 3 matrix: y[,,1], y[,,2], y[,,3] and write rbind(y[,,1], y[,,2], y[,,3]) I get what I want. But what if I have hundreds such matrix. How to do it. Robert [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] TR: Latent Class Analysis
> De : Pousset [mailto:[EMAIL PROTECTED] > Envoyi : mardi 4 juillet 2006 18:38 > @ : 'r-help@stat.math.ethz.ch' > Objet : Latent Class Analysis > > > > Hello everybody, > > > > I am working on latent class analysis and have already used the R > function > + lca ; (in the e1071 package). I ve got interesting results but I cant > simply find out the methodology used by this routine : > > 1) What kind of model is behind the routine (mixture model? If so, can you > choose among different kind of distributions such as normal, Poisson, > binomial) > > 2) What kind of algorithm is used (hierarchical methods? Relocation > methods?) > > 3) Which criterion allows determining the best model? > > In addition, I wonder if it is possible, with R software, to determine the > best number of class or do one have to fix it a priori. > > If one can help, thanks a lot, > > > > Maud > > INSERM U669, Cochin Hospital, Paris > > > You can use package (available at R page) poLCA that has documentation describing what you want. Look also at http://dlinzer.bol.ucla.edu/poLCA/ As far as you know BIC, AIC (based on chi-sqr and G^2 statistics) and Cressie-Read allow you to choose the most appropriate model. Best, Robert __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] shapiro.test() output
> -Original Message- > From: [EMAIL PROTECTED] [mailto:r-help- > [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] > Sent: Wednesday, July 12, 2006 11:14 PM > To: r-help@stat.math.ethz.ch > Subject: [R] shapiro.test() output > > R Users: > > My question is probably more about elementary statistics than the > mechanics of using R, but I've been dabbling in R (version 2.2.0) and > used it recently to test some data . > > I have a relatively small set of observations (n = 12) of arsenic > concentrations in background groundwater and wanted to test my > assumption of normality. I used the Shapiro-Wilk test (by calling > shapiro.test() in R) and I'm not sure how to interpret the output. > Here's the input/output from the R console: > > >As = c(13, 17, 23, 9.5, 20, 15, 11, 17, 21, 14, 22, 13) > >shapiro.test(As) > > Shapiro-Wilk normality test > > data: As > W = 0.9513, p-value = 0.6555 > > How do I interpret this? I understand, from poking around the internet, > that the higher the W statistic the "more normal" the data. > > What is the null hypothesis - that the data is normally distributed? > > What does the p-value tell me? 65.55% chance of what - getting > W-statistic greater than or equal to 0.9513 (I picked this up from the > Dalgaard book, Introductory Statistics with R, but its not really > sinking in with respect to how it applies to a Shipiro Wilk test).? > > The method description - retrieved using ?shapiro.test() - is a bit > light on details. > > Thanks much. The null hypothesis: the data is normally distributed. If p-value > \alpha (significance level) it means that there is no evidence to reject null hypothesis. Otherwise you reject - your data is not normally distributed. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Second Partial Derivatives
Hello, Does R have any build-in function which allow me to count second partial derivatives numerically? RobertM [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] print color
Dear R Users, Is it possible to make R print the largest item in each row of a matrix X with red font? Example: 1247 8431 ... Therefore 7 and 8 should be in red color. I would appreciate any suggestion Robert McFadden [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Decimal places
Thank you very much. Round(x, digids=2) works perfect. Rob -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 24, 2006 10:47 PM To: Robert Mcfadden Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Decimal places On Wed, 24 May 2006, Robert Mcfadden wrote: > Hello, > > I would like to force R to print 2 decimal places. I use options(digits=2) > but as far as I know it prints significant digits so in certain cases is > more then 2. > > Is there other way to do it? ?round, possibly format(rounf(x, 2), nsmall = 2) if you want exactly 2 decimal places. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Decimal places
Hello, I would like to force R to print 2 decimal places. I use options(digits=2) but as far as I know it prints significant digits so in certain cases is more then 2. Is there other way to do it? Best, Robert [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Matrix in 3D
Thank you very much you Robin and Uwe. Od: Robin Hankin <[EMAIL PROTECTED]> Do: Uwe Ligges <[EMAIL PROTECTED]> Data: 22 maja 2006 11:04 Temat: Re: [R] Matrix in 3D > Hi > > there are dozens of examples of this kind of thing > in the R-and-octave.txt file, in the contributed docs section > of CRAN. See the "multidimensional arrays" section, near the > bottom, for reproduction of all of matlab/octave's array > handling capabilities. > > best wishes > > > Robin > > > > On 22 May 2006, at 09:56, Uwe Ligges wrote: > > > [EMAIL PROTECTED] wrote: > > > >> Dear R Users, > >> Is it possible to add another (third) index to matrix (as in > >> MATLAB). For some analysis e.g. finite mixture models is > >> necessary. Simple example > >> > >> i<-3 > >> matrix[, , i]<-matrixA[, ,i]%*%matrixB[, , i] > > > > > > See ?array > > > > Uwe Ligges > > > > > >> I would appreciate any help > >> Rob > >> > >> __ > >> R-help@stat.math.ethz.ch mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-help > >> PLEASE do read the posting guide! http://www.R-project.org/posting- > >> guide.html > > > > __ > > R-help@stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! http://www.R-project.org/posting- > > guide.html > > -- > Robin Hankin > Uncertainty Analyst > National Oceanography Centre, Southampton > European Way, Southampton SO14 3ZH, UK > tel 023-8059-7743 > > > > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Matrix in 3D
Dear R Users, Is it possible to add another (third) index to matrix (as in MATLAB). For some analysis e.g. finite mixture models is necessary. Simple example i<-3 matrix[, , i]<-matrixA[, ,i]%*%matrixB[, , i] I would appreciate any help Rob __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] iteration history
Dear R Users I would like to use optim function to optimize a function. I read help but I couldn't find what I need: is it possible to get information after each iteration, for example as there is in MATLAB: Gradient's Iteration Func-count f(x)Step-size infinity-norm 0 24 388.97614 1 72 385.67 0.0292637 16.8 2 96 383.54 1 4.15 3 120 383.412 1 0.108 4 144 383.412 1 0.002 5 168 383.412 10.00149 6 192 383.412 1 6.23e-005 7 216 383.412 1 1.01e-005 It is useful when iteration takes long time - I know what's happen I would appreciate any suggestion Robert __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html