[R] anyone has C++ STL classes stability issue if used with R

2007-02-13 Thread Oleg Sklyar
Hello, is there any one who uses C++ STL classes when programming shared libs for R and has had any problems with STL? In the very simple example below I am constantly getting segfaults when trying to populate the queue. The segfault occurs at what looks like a random index in the loop when

[R] anyone has C++ STL classes stability issue if used with R

2007-02-13 Thread Oleg Sklyar
Continued: With the following modifications (using pointers) it works (needs memory cleaning afterwards and new less operator though) and I do not understand why: typedef priority_queuePixel * PixelPrQueue; ... pq.push( new Pixel(i, j, val) ); ... Oleg Sklyar wrote: Hello, is there any one

Re: [R] Help neural network in R

2007-02-13 Thread Vladimir Eremeev
Here is the list of NN related packages http://cran.r-project.org/src/contrib/Views/MachineLearning.html I also have written some bindings from R to the SNNS (Stuttgart neural network simulator), however, they are still not on the release stage. vinod gullu wrote: I am interested in Neural

Re: [R] Trying to replicate error message in subset()

2007-02-13 Thread Petr Pikal
Hi On 12 Feb 2007 at 10:42, Michael Rennie wrote: Date sent: Mon, 12 Feb 2007 10:42:21 -0500 To: Petr Pikal [EMAIL PROTECTED], r-help@stat.math.ethz.ch From: Michael Rennie [EMAIL PROTECTED] Subject:Re: [R] Trying to replicate

[R] Unable to load RMySQL

2007-02-13 Thread Ravi S. Shankar
Hi R users, I am unable to load RMySQL. The zip file is not available which I guess is needed to load this pakage. I also tried extracting the package from RMySQL_0.5-11.tar.gz and then pasted the package in the directory where R is loaded for which I am getting the following error message

[R] isoMDS vs. other non-metric non-R routines

2007-02-13 Thread Philip Leifeld
Dear useRs, last week I asked you about a problem related to isoMDS. It turned out that in my case isoMDS was trapped. Nonetheless, I still have some problems with other data sets. Therefore I would like to know if anyone here has experience with how well isoMDS performs in comparison to

Re: [R] Can a data.frame column contain lists/arrays?

2007-02-13 Thread John Kane
--- Christian Convey [EMAIL PROTECTED] wrote: I'd like to have a data.frame structured something like the following: d - data.frame ( x=list( c(1,2), c(5,2), c(9,1) ), y=c( 1, -1, -1) ) The reason is this: 'd' is the training data for a machine learning algorithm. d$x is the

Re: [R] anyone has C++ STL classes stability issue if used with R

2007-02-13 Thread Duncan Murdoch
On 2/13/2007 3:55 AM, Oleg Sklyar wrote: Hello, is there any one who uses C++ STL classes when programming shared libs for R and has had any problems with STL? I don't, but I'd suggest asking a technical question like this on R-devel instead of R-help if you don't get help here. I can see

Re: [R] isoMDS vs. other non-metric non-R routines

2007-02-13 Thread Christian Hennig
Dear Phil, I don't have experiences with Minissa but I know that isoMDS is bad in some situations. I have even seen situations with non-metric dissimilarities in which the classical MDS was preferable. Some alternatives that you have: 1) Try to start isoMDS from other initial configurations

Re: [R] anyone has C++ STL classes stability issue if used with R

2007-02-13 Thread Oleg Sklyar
Duncan, you are right about Rf_..., otherwise the lengths are checked in the R side, this is just one of the functions I have in the package and all arguments are thoroughly checked. But apparently, the same code if redefined for using pointers instead of references works just perfectly fine

[R] Fatigued R

2007-02-13 Thread Shubha Vishwanath Karanth
Hi R, Please solve my problem... I am extracting Bloomberg data from R, in a loop. R is getting fatigued by doing this process and gives some errors. I introduced sleep function. Doing this sometimes I get the results and sometimes not. I even noticed that if I give complete rest

Re: [R] Fatigued R

2007-02-13 Thread Sarah Goslee
Hi Shubha, Perhaps you haven't gotten any help because you haven't provided a reproducible example, or even told us what you are trying to do (specifically) or what errors you are receiving. Frankly, your problem statement doesn't make any sense to me, and I can't provide advice without more

Re: [R] Fatigued R

2007-02-13 Thread Shubha Vishwanath Karanth
OhkkkI will try to do that now This is my download function... download-function(fil) { con-blpConnect(show.days=show_day, na.action=na_action, periodicity=periodicity) for(i in 1:lent) { Sys.sleep(3) cdaily-blpGetData(con,unique(t[,i]),fil,start=as.chron(as.Date(1/1/199 6,

[R] lag orders with ADF.test

2007-02-13 Thread Martin Ivanov
Hello! I do not understand what is meant by: aic and bic follow a top-down strategy based on the Akaike's and Schwarz's information criteria in the datails to the ADF.test function. What does a top-down strategy mean? Probably the respective criterion is minimized and the mode vector

[R] glpk package

2007-02-13 Thread ujjwal wani
  Hi All, I want to read MPS format file using this file. I am able to read cofficient of objective function,number of columns, number of rows etc. But not able to read constraint matrix its rhs values. Could anyone please help in this? is there any good documentation available

[R] lme4/lmer: P-Values from mcmc samples or chi2-tests?

2007-02-13 Thread Christoph Scherber
Dear R users, I have now tried out several options of obtaining p-values for (quasi)poisson lmer models, including Markov-chain Monte Carlo sampling and single-term deletions with subsequent chi-square tests (although I am aware that the latter may be problematic). However, I encountered

[R] Suddenly Subscript out of bounds

2007-02-13 Thread roderick . castillo
Hello Using R Version 2.3.1 I have setup a cronjob to update packages, which worked successfully almost a year (it was called daily). Basically, it runs like this: Sys.getenv(http_proxy) update.packages(ask=F,repos=http://cran.r-project.org;) (the http_proxy environment variable is set prior

Re: [R] Fatigued R

2007-02-13 Thread Sarah Goslee
That's a help. It isn't actually reproducible since I have no idea where for example blpConnect() comes from, but it's still an improvement. Moving the important bit to the top: The error message I get if the program is not run is: Error in dimnames(x) - dn : length of 'dimnames' [2] not

[R] Polygon triangulation?

2007-02-13 Thread Duncan Murdoch
Can anyone point me to a package that contains code to triangulate a polygon? This is easy if the polygon is convex, but tricky if not. One algorithm to do it is due to Meister, and is described here: www.math.gatech.edu/~randall/AlgsF06/planartri.pdf Duncan Murdoch

[R] Generating MVN Data

2007-02-13 Thread Rauf Ahmad
Dear All I want to generate multivariate normal data in R for a given covariance matrix, i.e. my generated data must have the given covariance matrix. I know the rmvnorm command is to be used but may be I am failing to properly assign the covariance matrix. Any help will be greatly

Re: [R] Generating MVN Data

2007-02-13 Thread Robin Hankin
Hi give rmvnorm() any symmetric positive definite matrix and it should work: rmvnorm(n=10,mean=1:2,sigma=matrix(c(1,0.5,0.5,1),2,2)) [,1] [,2] [1,] -0.1118 2.514 [2,] 1.8667 1.628 [3,] 3.2477 2.263 [4,] 1.0166 2.381 [5,] -0.0888 -0.132 [6,] -0.9249 0.610 [7,] 1.5046

Re: [R] Fatigued R

2007-02-13 Thread ONKELINX, Thierry
Dear Shubha, The error message tells you that the error occurs in the line: merge(d_mer,cdaily) And the problem is that d_mer and cdaily have a different class. It looks as you need to convert cdaily to the correct class (same class as d_mer). Don't forget to use traceback() when

Re: [R] Polygon triangulation?

2007-02-13 Thread ONKELINX, Thierry
Have you tried the tri-package? Cheers, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section

Re: [R] lag orders with ADF.test

2007-02-13 Thread Pfaff, Bernhard Dr.
Hello! I do not understand what is meant by: aic and bic follow a top-down strategy based on the Akaike's and Schwarz's information criteria in the datails to the ADF.test function. What does a top-down strategy mean? Probably the respective criterion is minimized Hello Martin, are you

Re: [R] Generating MVN Data

2007-02-13 Thread Chuck Cleland
Rauf Ahmad wrote: Dear All I want to generate multivariate normal data in R for a given covariance matrix, i.e. my generated data must have the given covariance matrix. I know the rmvnorm command is to be used but may be I am failing to properly assign the covariance matrix. Any help

Re: [R] Width of a plotting point (in inches) in grid package

2007-02-13 Thread Randall C Johnson [Contr.]
Hello, I was thinking that was probably the case. I'm creating a series of graphics that contain smaller graphics, and was trying to reduce the bounding box as much as possible with out the plotting points bleeding over to the surrounding features. I could hard code the size of the bounding boxes

Re: [R] Generating MVN Data

2007-02-13 Thread Dimitris Rizopoulos
you probably want to use mvrnorm() from package MASS, e.g., library(MASS) mu - c(-3, 0, 3) Sigma - rbind(c(5,3,2), c(3,4,1), c(2,1,3)) x - mvrnorm(1000, mu, Sigma, empirical = TRUE) colMeans(x) var(x) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical

Re: [R] Generating MVN Data

2007-02-13 Thread Prof Brian Ripley
'should work', yes. Do what he asked for (in any reasonable reading), no. set.seed(1) library(mvtnorm) ## you both omitted to mention that X - rmvnorm(n=10,mean=1:2,sigma=matrix(c(1,0.5,0.5,1),2,2)) var(X) [,1] [,2] [1,] 0.4878773 0.1238040 [2,] 0.1238040 0.9508090

Re: [R] Fatigued R

2007-02-13 Thread ONKELINX, Thierry
Shubha, You suggested the solution yourself: first make sure that the downloaded data has no errors and reload it when it has errors. But that's something you'll have to do yourself. Have a look at the data downloaded with and without errors and try to see the difference. Again: it's impossible

Re: [R] Polygon triangulation?

2007-02-13 Thread Duncan Murdoch
On 2/13/2007 9:43 AM, ONKELINX, Thierry wrote: Have you tried the tri-package? You mean tripack? I looked and saw Delaunay triangulation (triangulating points), but triangulating polygons is a different (unrelated?) problem. Duncan Murdoch Cheers, Thierry

Re: [R] Suddenly Subscript out of bounds

2007-02-13 Thread Duncan Murdoch
On 2/13/2007 9:15 AM, [EMAIL PROTECTED] wrote: Hello Using R Version 2.3.1 I have setup a cronjob to update packages, which worked successfully almost a year (it was called daily). Basically, it runs like this: Sys.getenv(http_proxy)

Re: [R] Fatigued R

2007-02-13 Thread Shubha Vishwanath Karanth
Hi all, thanks for your reply But I have to make one thing clear that there are no errors in programming...I assure that to you, because I have extracted the data many times from the same program... The problem is with the connection of R with Bloomberg, sometimes the data is not fetched at

Re: [R] Polygon triangulation?

2007-02-13 Thread Roger Bivand
On Tue, 13 Feb 2007, ONKELINX, Thierry wrote: Have you tried the tri-package? Perhaps the GPC C library used in the gpclib package, and in PBSmapping will get closer - it partitions polygons into tristrip sets. Cheers, Thierry

Re: [R] help with tryCatch

2007-02-13 Thread Henrik Bengtsson
Hi, google R tryCatch example and you'll find: http://www.maths.lth.se/help/R/ExceptionHandlingInR/ Hope this helps Henrik On 2/13/07, Stephen Bond [EMAIL PROTECTED] wrote: Henrik, I had looked at tryCatch before posting the question and asked the question because the help file was not

Re: [R] make check failure, internet.Rout.fail, Error in strsplit

2007-02-13 Thread Paul Lynch
Thanks for giving it a try. It is very odd that you got Content-Length when I am getting Content-length. I just tried curl (I had been using telnet to port 80) and I got the same (error causing) length result: curl --head http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat HTTP/1.1 200 OK

[R] Hierarchical ANOVA

2007-02-13 Thread Romain . Mayor
Hello, Does somebody could help me in the computation(formulation) of a hierarchical ANOVA using linear model in R? I'm working in a population biology study of an endangered species. My aim is to see if I have effects of Density of individuals/m2 on several measured plants fitness traits. As

[R] GEV by weighted moments method

2007-02-13 Thread KOITA Lassana - STAC/ACE
Hi R-users, Could anyone point me to package of GEV (not the POT package) including function that estimates parameters by weighted moments method? Best regrads Lassana KOITA Chargé d'Etudes de Sécurité et d'Exploitation aéroportuaires / Project Engineer Airport Safety Studies Statistical

Re: [R] Advanced graphics for points

2007-02-13 Thread Marc Schwartz
On Tue, 2007-02-13 at 08:31 -0800, Strongbad78 wrote: Hi all, For aestethic purposes, I would like to plot points on an xy plot that consist of a filled circle with a black outline. I can sort of bodge it by plotting pch=21, col=black and pch=16, col=red on the same plot, but it looks a bit

[R] RE2: Suddenly Subscript out of bounds

2007-02-13 Thread roderick . castillo
If you tell me how to update R itself automatically, I will go for your advice. I am not aware of any method to do it... Bye Rick ONKELINX,

Re: [R] Fatigued R

2007-02-13 Thread bogdan romocea
The problem with your code is that it doesn't check for errors. See ?try, ?tryCatch. For example: my.download - function(forloop) { notok - vector() for (i in forloop) { cdaily - try(blpGetData(...)) if (class(cdaily) == try-error) { notok - c(notok, i) } else {

[R] Missing variable in new dataframe for prediction

2007-02-13 Thread LE TERTRE Alain
Hi, I'm using a loop to evaluate several models by taking adjacent variables from my dataframe. When i try to get predictions for new values, i get an error message about a missing variable in my new dataframe. Below is an example adapted from ?gam in mgcv package library(mgcv) set.seed(0)

Re: [R] RE2: Suddenly Subscript out of bounds

2007-02-13 Thread ONKELINX, Thierry
Roderick, I'm not suggesting that you need a script to update R automatically. I don't think it is possible to do that. I just was wondering why you are so eager to update all the packages daily, but still are working with an outdated version of R. Myself, I tend to check the R lists for new

[R] matlab style plotting in R

2007-02-13 Thread Maria Vatapitakapha
Hello I was wondering how I can achieve matlab style plotting in R, in the sense that matlab allows you to plot multiple sets of variables within the same x-y axes. plot in R does not seem to cater for this. I tried 'overplot' from the gplots package but this assumes different y axes for the

Re: [R] Missing variable in new dataframe for prediction

2007-02-13 Thread Gabor Grothendieck
The call to library(splines) is missing and also try replacing the line b - ... with fo - as.formula(sprintf(y ~ s(x0) + s(x1) + ns(%s, 3), names(Mydata)[i])) b - do.call(gam, list(fo, data = Mydata)) to dynamically recreate the formula on each iteration of the loop with the correct name, x2

Re: [R] multinomial logistic regression with equality constraints?

2007-02-13 Thread Roger Levy
Many thanks for this, Jas. I was successfully able to use the revised version of multinomRob, and it satisfies exactly the needs I was looking for. Thanks once again. Best, Roger Jasjeet Singh Sekhon wrote: As we noted earlier and as is clearly stated in the docs, multinomRob is

Re: [R] Missing variable in new dataframe for prediction

2007-02-13 Thread Gabor Grothendieck
Actually this simpler replacement for the b - ... line would work just as well: fo - as.formula(sprintf(y ~ s(x0) + s(x1) + ns(%s, 3), names(Mydata)[i])) b - gam(fo, data = Mydata) On 2/13/07, Gabor Grothendieck [EMAIL PROTECTED] wrote: The call to library(splines) is missing and also try

Re: [R] matlab style plotting in R

2007-02-13 Thread Matthew Keller
Hi Maria, I'm interested in the responses you get. The way I do this is to use par(new=TRUE), which tells R not to clean the frame before plotting the next plot. So, eg ###Overlaid plot op - par(mar = c(5, 4, 4, 5) + 0.1, las = 2)

Re: [R] matlab style plotting in R [Broadcast]

2007-02-13 Thread Wiener, Matthew
In traditional R graphics, you can take a look at matplot. You might also want to look at the lattice package. Hope this helps, Matt Wiener -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maria Vatapitakapha Sent: Tuesday, February 13, 2007 12:20 PM

Re: [R] matlab style plotting in R

2007-02-13 Thread Lanre Okusanya
try ?lines ?points On 2/13/07, Maria Vatapitakapha [EMAIL PROTECTED] wrote: Hello I was wondering how I can achieve matlab style plotting in R, in the sense that matlab allows you to plot multiple sets of variables within the same x-y axes. plot in R does not seem to cater for this. I

[R] Advice on visual graph packages

2007-02-13 Thread Jarrett Byrnes
Hey, all. I'm looking for packages that are good at two things 1) Drawing directed graphs (i.e nodes and edges), both with single and double headed arrows, as well as allowing for differences in line width and solid versus dashed. Note: I've tried Rgraphviz here, but have run into some

[R] simulating from Langevin distributions

2007-02-13 Thread Ranjan Maitra
Dear all, I have been looking for a while for ways to simulate from Langevin distributions and I thought I would ask here. I am ok with finding an algorithmic reference, though of course, a R package would be stupendous! Btw, just to clarify, the Langevin distribution with (mu, K), where mu is

Re: [R] Advice on visual graph packages

2007-02-13 Thread Gabor Grothendieck
Also try gplot in the sna package to see if it does what you want. Here are some examples from the r-help archives: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/87003.html http://finzi.psych.upenn.edu/R/Rhelp02a/archive/84442.html On 2/13/07, Jarrett Byrnes [EMAIL PROTECTED] wrote: Hey,

Re: [R] Advice on visual graph packages

2007-02-13 Thread Gabor Csardi
Jarrett, check the gplot function in package SNA and the plot.igraph and tkplot functions in package 'igraph'. SNA's gplot is more flexible, it knows different shapes, edges can be curved, etc, tkplot is interactive if you desire that. It is also easy to convert between the two graph

[R] isoMDS vs. other non-metric non-R routines

2007-02-13 Thread Jari Oksanen
Sorry for not threading: I don't subscribe to this list, and the linking of web browser and email seems to be rudimentary. I don't know what is Minissa. Sounds like a piece of software. What is the method it implements? That is, is it supposed to implement the same method as isoMDS or

Re: [R] Advice on visual graph packages

2007-02-13 Thread David Barron
You might also want to look at the network package, which includes a plot method for network objects that is pretty flexible. It also enables you to convert a network object into various different matrix reprentations. On 13/02/07, Jarrett Byrnes [EMAIL PROTECTED] wrote: Hey, all. I'm looking

Re: [R] matlab style plotting in R

2007-02-13 Thread Stefan Grosse
There are many ways if I understood what you indend to do: example data: toplot-data.frame(x=c(1:5,1:5),y=rnorm(10),sbs=c(rep(a,5),rep(b,5))) 1st with plot itself: plot(y~x,data=toplot,type=n) lines(y~x,data=subset(toplot,sbs==a),type=b,pch=4,col=blue)

[R] Computing stats on common parts of multiple dataframes

2007-02-13 Thread Murali Menon
Folks, I have three dataframes storing some information about two currency pairs, as follows: R a EUR-USD NOK-SEK 1.231.33 1.221.43 1.261.42 1.241.50 1.211.36 1.261.60 1.291.44 1.251.36 1.271.39 1.231.48 1.221.26 1.241.29 1.271.57 1.21

Re: [R] Fatigued R

2007-02-13 Thread davidr
I can't be sure what is happening to Shubhak, but I know that the Bloomberg server bbcomm.exe throws unhandled exceptions in a unreproducable and uncatchable way, somewhere in their tcp code. It is one of the big frustrations for me in my work. Shubhak, I think you will just have to look

Re: [R] simulating from Langevin distributions

2007-02-13 Thread Ravi Varadhan
Hi Ranjan, I think that the following would work: library(MASS) rlangevin - function(n, mu, K) { q - length(mu) norm.sim - mvrnorm(n, mu=mu, Sigma=diag(1/K, q)) cp - apply(norm.sim, 1, function(x) sqrt(crossprod(x))) sweep(norm.sim, 1, cp, FUN=/) } mu - runif(7) mu - mu / sqrt(crossprod(mu))

Re: [R] Polygon triangulation?

2007-02-13 Thread Duncan Murdoch
On 2/13/2007 10:10 AM, Roger Bivand wrote: On Tue, 13 Feb 2007, ONKELINX, Thierry wrote: Have you tried the tri-package? Perhaps the GPC C library used in the gpclib package, and in PBSmapping will get closer - it partitions polygons into tristrip sets. That would be just what I need.

[R] adf test: trend, no drift - rep: invalid 'times' argument

2007-02-13 Thread Martin Ivanov
Hello! I am applying the ADF.test function from package uroot to a time series of data. When I apply the full test, incorporating drift and trend terms, the regressor estimate of the drift term is not significantly different from zero. So I apply the test to a model without drift term, with

[R] Multidimensional Integration over arbitrary sets

2007-02-13 Thread Saptarshi Guha
Hi, I need to integrate a 2D function over range where the limits depend on the other e.g integrate f(x,y)=x*y over {x,0,1} and {y,x,1}. i.e \int_0^1 \int_x^1 xy dydx I checked adapt but it doesn't seem to help here. Are they any packages for this sort of thing?

[R] Questions about results from PCAproj for robust principal component analysis

2007-02-13 Thread Talbot Katz
Hi. I have been looking at the PCAproj function in package pcaPP (R 2.4.1) for robust principal components, and I'm trying to interpret the results. I started with a data matrix of dimensions RxC (R is the number of rows / observations, C the number of columns / variables). PCAproj returns a

Re: [R] Computing stats on common parts of multiple dataframes

2007-02-13 Thread Erik Iverson
Murali - I've come up with something that might with work, with gratutious use of the *apply functions. See ?apply, ?lappy, and ?mapply for how this would work. Basically, just set my.list equal to a list of data.frames you would like included. I made this to work with matrices first, so

Re: [R] make check failure, internet.Rout.fail, Error in strsplit

2007-02-13 Thread Paul Lynch
I just happen to also have a MacOS 10.4 machine, but when I tried from there, I still got Content-length. Anyway, I am fairly certain that headers received from web servers would not be modified by the receiving machine or anything in-between. I suspect that the machine at www.stats.ox.ac.uk,

Re: [R] SAS, SPSS Product Comparison Table

2007-02-13 Thread Muenchen, Robert A (Bob)
Hi All, Thanks to lots of good ideas from R-helpers, I've polished up the table and posted it here: http://oit.utk.edu/scc/RforSASSPSSproducts.pdf To be consistent with its product orientation, I dropped mixed models (it's not a separate product in either SAS or SPSS). I also added SAS/QC and

Re: [R] Multidimensional Integration over arbitrary sets

2007-02-13 Thread Ravi Varadhan
Hi, By defining your function appropriately (e.g. using indicator functions), you can make adapt work: myfunc - function(x) { x[1]*x[2] * (x[1] = x[2]) } # Exact answer is 1/8 library(adapt) adapt(2, lo=c(0,0), up=c(1,1), functn=myfunc) value relerr minpts lenwrk

[R] [R-pkgs] New version of rattle released

2007-02-13 Thread Graham Williams
A new version of Rattle (2.1.123), a Gnome-base GUI for data mining, written copmletely in R, and available on GNU/Linux, Unix, Mac OSX, and MS/Windows, has been released to CRAN. There has been quite a lot of activity since the last update, including: Transform: Now include basic

[R] nls: missing value or an infinity (Error in numericDeriv) and singular gradient matrixError in nlsModel

2007-02-13 Thread Daniela Salvini
Hi, I am a non-expert user of R. I am essaying the fit of two different functions to my data, but I receive two different error messages. I suppose I have two different problems here... But, of which nature? In the first instance I did try with some different starting values for the

Re: [R] Computing stats on common parts of multiple dataframes

2007-02-13 Thread Gabor Grothendieck
Suppose our data frames are called DF1, DF2 and DF3. Then find the least number of rows, n, among them. Create a list, DFs, of the last n rows of the data frames and another list, mats, which is the same but in which each component is a matrix. Create a parallel median function, pmedian,

Re: [R] Computing stats on common parts of multiple dataframes

2007-02-13 Thread Gabor Grothendieck
Sorry, I switched variable names part way through. Here it is again: DFs - list(DF1, DF2, DF3) n - min(sapply(DFs, nrow)) DFs - lapply(DFs, tail, n) mats - lapply(DFs, as.matrix) pmedian - function(...) median(c(...)) medians - do.call(mapply, c(pmedian, mats)) replace(DFs[[1]], TRUE, medians)

Re: [R] nls: missing value or an infinity (Error in numericDeriv) andsingular gradient matrixError in nlsModel

2007-02-13 Thread Ravi Varadhan
Hi Daniela, Please read the error message from nls. The problem is with the start values for the parameters a and b. You haven't specified any, so it uses default values of a=1 and b=1, which may not be very good. So, you should specify good start values, if you have a reasonable idea of what

[R] Matrix manipulation

2007-02-13 Thread yoooooo
Hi, let's say I have this A = matrix(c(1, 2, 4), nrow=1) colnames(A)=c(YOO1, YOO2, YOO3) # ie # YOO1 YOO2 YOO3 #[1,]124 HELLO - NULL HELLO$YOO1=BOO HELLO$YOO2=BOO HELLO$YOO3=HOO and I want a matrix that will sum my categorization.. how can I do it efficiently without any

Re: [R] isoMDS vs. other non-metric non-R routines

2007-02-13 Thread Philip Leifeld
Thanks for your message. I don't know what is Minissa. Sounds like a piece of software. What is the method it implements? That is, is it supposed to implement the same method as isoMDS or something else? IsoMDS implements Kruskal's (and Young's and Sheperd's and Torgeson's) NMDS, but there

[R] Matrix manipulation

2007-02-13 Thread yoooooo
Hi, let's say I have this A = matrix(c(1, 2, 4), nrow=1) colnames(A)=c(YOO1, YOO2, YOO3) # ie # YOO1 YOO2 YOO3 #[1,]124 HELLO - NULL HELLO$YOO1=BOO HELLO$YOO2=BOO HELLO$YOO3=HOO and I want a matrix that will sum my categorization.. how can I do it efficiently without any

Re: [R] get.hist.quote problem yahoo

2007-02-13 Thread Kurt Hornik
Rene Braeckman writes: I had the same problem some time ago. Below is a function that I picked up on the web somewhere (can't remember where; may have been a newsletter). It's based on the tseries function but the difference is that this function produces a data frame with a column

Re: [R] simulating from Langevin distributions

2007-02-13 Thread Ranjan Maitra
Thanks to Ravi Varadhan for providing the solution. I guess the answer is that if X is MVN with mean mu and dispersion matrix given by I/K, then X/norm(X) is Langevin with the required parameters. A reference for this is Watson's Statistics on Spheres. Many thanks again and best wishes.

[R] Multiple comparisons

2007-02-13 Thread Pablo Faundez Hoffmann
Dear list, I have to do an ANOVA analysis with one fixed effect A and one random effect SUBJECT. TO do this I used aov in the form aov.m1 - aov(depvar ~ A + Error(SUBJECT/(A))); My question is if I obtain significant differences within the strata, does it make any sense to make multiple

[R] errors when installing new packages

2007-02-13 Thread YI ZHANG
Dear all, I met a problem when installing new packages on R, my system is linux fedora 6.0, the following is output. please help me. Thanks. install.packages('lars') --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL

[R] to loosenes

2007-02-13 Thread Norm Roemer
Hi, Save over 50% on your medication http://www.ledrx .com Remove space in the above link month will affect you, with reference to your personal chart, she snapped, sounding much more like Professor McGonagall than her usual airy-fairy self. I want it ready to hand in next Monday, and no

Re: [R] Advice on visual graph packages

2007-02-13 Thread Wolfgang Huber
Hi Jarrett, would the coercion methods for the graph class, provided by the package of the same name at Bioconductor be useful for doing what you want? This is the same class that also Rgraphviz works on. Try library(graph) example(graphNEL-class) as(gR, matrix) class ? graph class ? graphNEL

Re: [R] Matrix manipulation

2007-02-13 Thread Giovanni Petris
Hi, let's say I have this A = matrix(c(1, 2, 4), nrow=1) colnames(A)=c(YOO1, YOO2, YOO3) Why do you need A to be a matrix and not simply a vector? # ie # YOO1 YOO2 YOO3 #[1,]124 HELLO - NULL HELLO$YOO1=BOO HELLO$YOO2=BOO HELLO$YOO3=HOO Why do you need HELLO

Re: [R] Hierarchical ANOVA

2007-02-13 Thread joris . dewolf
Romain, Look for info on mixed models. In R you do this either with the library nlme or lme4. A good starting point is an article by Doug Bates in Rnews http://cran.r-project.org/doc/Rnews/Rnews_2005-1.pdf Joris [EMAIL PROTECTED] wrote on 13/02/2007 17:16:41: Hello, Does somebody could

Re: [R] Multidimensional Integration over arbitrary sets

2007-02-13 Thread Saptarshi Guha
Hi, Thanks! That should do it. Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha On Feb 13, 2007, at 3:56 PM, Ravi Varadhan wrote: Hi, By defining your function appropriately (e.g. using indicator functions), you can make adapt work: myfunc - function(x) {

Re: [R] errors when installing new packages

2007-02-13 Thread Ranjan Maitra
Hello Ying, This is really a Fedora Core 6 question. But anyway, it appears that you do not have gfortran which comes in the appropriate development package installed. Assuming you use yum, you find out the RPM using the following yum provides gfortran which will give you the RPM which

[R] (no subject)

2007-02-13 Thread Loai Mahmoud Awad Alzoubi
Hello All I am using R to find the impact of ignoring clustering, when indicated by these tests, on bias, variance and inference of estimates of interest, including population totals and regression coefficients. But when U have used the apVar function using the command test.lme1$apVar to find

Re: [R] help with tryCatch

2007-02-13 Thread Stephen Bond
Henrik, thank you for the reference. Can you please tell me why the following does not work? vec=c(hdfhjfd,jdhfhjfg)# non-existent file names catch=function(vec){ tryCatch({ ans =NULL;err=NULL; for (i in vec) { source(i) ans=c(ans,i) } },

[R] lattice graphics and source()

2007-02-13 Thread Dongfeng LI
Hi, I am trying the lattice graphics in R. Let's say, such a little experiment in file myprog.r: f - function(){ x - 1:10 y - x^2 xyplot(y ~ x) } f() Then I run the program: source(myprog.r) but nothing happens. Manully run f() at the command line: f() then the figure is shown.

Re: [R] lattice graphics and source()

2007-02-13 Thread Marc Schwartz
On Tue, 2007-02-13 at 16:44 -0800, Dongfeng LI wrote: Hi, I am trying the lattice graphics in R. Let's say, such a little experiment in file myprog.r: f - function(){ x - 1:10 y - x^2 xyplot(y ~ x) } f() Then I run the program: source(myprog.r) but nothing happens.

[R] model diagnostics for logistic regression

2007-02-13 Thread Dylan Beaudette
Greetings, I am using both the lrm() {Design} and glm( , family=binomial()) to perform a a logisitic regression in R. Apart from the typical summary() methods, what other methods of diagnosing logistic regression models does R provide? i.e. plotting an 'lm' object, etc. Secondly, is there

[R] Character size of labels in heatmap

2007-02-13 Thread Harshal D Dedhia
I am using the heatmap.2 function and passing (...,xlab = label1, ylab = label2, cexRow = 0.7, cexCol = 0.7) I have even set cex.lab, cex.axis, cex to 0.7; but in the plot, label1 and label2 don't seem to scale down. Any help would be appreciated. Cheers! Harshal [[alternative HTML

Re: [R] help with tryCatch

2007-02-13 Thread Henrik Bengtsson
Put the for loop outside the tryCatch(). /H On 2/13/07, Stephen Bond [EMAIL PROTECTED] wrote: Henrik, thank you for the reference. Can you please tell me why the following does not work? vec=c(hdfhjfd,jdhfhjfg)# non-existent file names catch=function(vec){ tryCatch({ ans

Re: [R] help with tryCatch

2007-02-13 Thread Henrik Bengtsson
To be more precise, put the tryCatch() only around the code causing the problem, i.e. around source(). /H On 2/13/07, Henrik Bengtsson [EMAIL PROTECTED] wrote: Put the for loop outside the tryCatch(). /H On 2/13/07, Stephen Bond [EMAIL PROTECTED] wrote: Henrik, thank you for the

Re: [R] model diagnostics for logistic regression

2007-02-13 Thread Frank E Harrell Jr
Dylan Beaudette wrote: Greetings, I am using both the lrm() {Design} and glm( , family=binomial()) to perform a a logisitic regression in R. Apart from the typical summary() methods, what other methods of diagnosing logistic regression models does R provide? i.e. plotting an 'lm' object,

[R] linear coefficient combination stderr?

2007-02-13 Thread ivo welch
dear r-experts---I have scrounged around in google (searching r-help) for the really obvious, but failed. could someone please point me to whatever function computes the standard error of a linear combination of the coefficients? m=lm( y ~ x1 + x2 + x3 ); t.stat= (coef(m)[2]+coef(m)[3])) /

[R] nested model: lme, aov and LSMeans

2007-02-13 Thread shirley zhang
I'm working with a nested model (mixed). I have four factors: Patients, Tissue, sex, and tissue_stage. Totally I have 10 patients, for each patient, there are 2 tissues (Cancer vs. Normal). I think Tissue and sex are fixed. Patient is nested in sex,Tissue is nested in patient, and tissue_stage

[R] Legend function

2007-02-13 Thread amna khan
Dear Sir Lengend add a bix containing plot discription in the existing plot. Is there any function which decribe the lines in a plot outside the existing plot? I have also a question related to following statement. In this statement * is used for plot discription. If we have plotted type=o of

Re: [R] Can a data.frame column contain lists/arrays?

2007-02-13 Thread hadley wickham
I'd like to have a data.frame structured something like the following: d - data.frame ( x=list( c(1,2), c(5,2), c(9,1) ), y=c( 1, -1, -1) ) The reason is this: 'd' is the training data for a machine learning algorithm. d$x is the independent data, and d$y is the dependent data.

Re: [R] linear coefficient combination stderr?

2007-02-13 Thread Søren Højsgaard
Try the esticon function in the doBy package. Regards Søren Fra: [EMAIL PROTECTED] på vegne af ivo welch Sendt: on 14-02-2007 04:21 Til: r-help Emne: [R] linear coefficient combination stderr? dear r-experts---I have scrounged around in google (searching

Re: [R] Fatigued R

2007-02-13 Thread Shubha Vishwanath Karanth
Hi all, So, is there any method to make bbcomm.exe to sleep for sometime...? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 14, 2007 12:42 AM To: bogdan romocea; Shubha Vishwanath Karanth Cc: r-help Subject: RE: [R] Fatigued R I can't be

  1   2   >