Re: [R] How to flag those iterations which yield a warning?

2011-02-18 Thread Ravi Varadhan
Dear Bill - your solution works beautifully. Thank you very much. David - thank you as well for your solution. It also works. Best regards, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and

[R] help files

2011-02-18 Thread Erin Hodgess
Dear R People: I downloaded the binary for R-2.12.1 on Windows 7. When checking help files, I got the following: > ?mean starting httpd help server ... done Error in shell.exec(url) : problem in displaying 'http://127.0.0.1:16945/library/base/html/mean.html' > I did check the URL in my IE bro

Re: [R] Scaling Lattice Graphics for tikzDevice

2011-02-18 Thread Deepayan Sarkar
On Fri, Feb 18, 2011 at 11:04 PM, Elliot Joel Bernstein wrote: > I'm trying to use lattice graphics to produce some small plots for inclusion > in a LaTeX file. I want the LaTeX fonts to be used in the plots, but to be > scaled down to match the size of the plot. I have written the following cod

Re: [R] Variable length datafile import problem

2011-02-18 Thread Peter Ehlers
Ingo, The awk solution may be your preferred bet, but here's an R way to do it. It's based on adding a copy of the longest row (in terms of number of fields) at the top of the file so that R knows that you need that many fields. ( read.table and friends check the first 5 rows to determine what's

Re: [R] question about generics

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 10:45 PM, Erin Hodgess wrote: Dear R People: Is there a way to determine which functions are generics, please? I looked for something like is.Generic, but no luck. I don't think you were particularly strenous in your efforts: ?isGeneric Thanks in advance! Sincerely

[R] question about generics

2011-02-18 Thread Erin Hodgess
Dear R People: Is there a way to determine which functions are generics, please? I looked for something like is.Generic, but no luck. Thanks in advance! Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailt

Re: [R] Blotter package ?.

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 8:26 PM, veepsirtt wrote: Hi, Where is the "blotter" package?.It is not available at R-Forge. What is your evidence of that? It was there when I just looked. Let me know how to get it. With Regards veepsirtt -- View this message in context: http://r.789695.n4.nabb

Re: [R] Kolmogorov-smirnov test

2011-02-18 Thread Greg Snow
The KS test was designed for continuous variables. The vcd package has tools for exploring categorical variables and distributions. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun

Re: [R] recoding a data in different way: please help

2011-02-18 Thread Umesh Rosyara
Hi Josh and R community members Thank you for quick response. I am impressed with the help. To solve my problems, I tried recode options and I had the following problem and which motivated me to leave it. Thank you for remind me the option again, might help to solve my problem in different wa

[R] Start and end point of peak

2011-02-18 Thread Ramya
Hi There, I was wondering if there any function that would give me the start and end points of a Peak. I have absorbance values from the chromatogram and i have the retention time of each peak but i want to find the start and end points of peak. I need that to find the area under each Peak. I t

Re: [R] recoding a data in different way: please help

2011-02-18 Thread Umesh Rosyara
Hi Dennis Thank you so much it helped me to go a step ahead. Regarding comparisions, here is what I want to do. If value of imarkP1 = 22, imarkP2 = 11, and mark1= 12 then the value of mark1 should be coded as 1 (means that all three conditions must be satified to get a code

[R] Blotter package ?.

2011-02-18 Thread veepsirtt
Hi, Where is the "blotter" package?.It is not available at R-Forge. Let me know how to get it. With Regards veepsirtt -- View this message in context: http://r.789695.n4.nabble.com/Blotter-package-tp3313796p3313796.html Sent from the R help mailing list archive at Nabble.com. [[alterna

[R] Confidence Intervals on Standard Curve

2011-02-18 Thread Ben Ward
Hi, I wonder if anyone could advise me with this: I've been trying to make a standard curve in R with lm() of some standards from a spectrophotometer, so as I can express the curve as a formula, and so obtain values from my treated samples by plugging in readings into the formula, instead of t

[R] Setting Lambda constraints for MCMC ordinal model

2011-02-18 Thread Haillie
post47 <- MCMCordfactanal(~a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12+a13+a14+a15+a16+a17+a18+a19+a20+a21+a22+a23+a24+a25+a26+a27+a28+a29+a30+a31+a32+a33+a34+a35+a36+a37+a38, data=un47,lambda.constraints=list(a8=list(2,"+")), factors=1, burnin=5000, mcmc=20, thin=40, verbose=1000, L0=0.05, store

Re: [R] ERGM + Anova

2011-02-18 Thread Ben Bolker
Roger Gomes gmail.com> writes: > > > Hi Bert, thanks about your answer. > > Well, I would like to calculate anova.ergm in R. Wich values (edges, > vertices) the library use to calculate F values or p-value with graphos. > > The calculus is like a Pandora Box... I put there a network (ergm) a

[R] Kolmogorov-smirnov test

2011-02-18 Thread tsippel
Is the kolmogorov-smirnov test valid on both continuous and discrete data? I don't think so, and the example below helped me understand why. A suggestion on testing the discrete data would be appreciated. Thanks, a <- rnorm(1000, 10, 1);a # normal distribution a b <- rnorm(1000, 12, 1.5);b # no

Re: [R] cv.glmnet errors

2011-02-18 Thread Peter Ehlers
On 2011-02-17 13:45, Brian Tsai wrote: Hi, I am trying to do multinomial regression using the glmnet package, but the following gives me an error (for no reason apparent to me): library(glmnet) cv.glmnet(x=matrix(c(1,2,3,4,5,6,1,2,3,4,5,6), nrow=6),y=as.factor(c(1,2,1,2,3,3)),family='multinomia

Re: [R] non-ascii characters in R output

2011-02-18 Thread Matt Shotwell
On Fri, 2011-02-18 at 19:50 -0500, Duncan Murdoch wrote: > On 18/02/2011 5:58 PM, Matt Shotwell wrote: > > OK, looks like my web browser does render non-ascii characters output by > > R when it's given the encoding explicitly. This works for me: > http-equiv="Content-Type" content="text/html; cha

Re: [R] non-ascii characters in R output

2011-02-18 Thread Duncan Murdoch
On 18/02/2011 5:58 PM, Matt Shotwell wrote: OK, looks like my web browser does render non-ascii characters output by R when it's given the encoding explicitly. This works for me:. So that's another solution, but not a general one. I don't understand your final comment. What is not general abou

Re: [R] Line spacing in graphics

2011-02-18 Thread Peter Langfelder
On Fri, Feb 18, 2011 at 3:55 PM, Sarah Goslee wrote: > Peter, > > Try par()$lheight > > The catch is, you need to set it *before* the call to text() > > par(lheight=.8) # closer together > text(x, y, "whatever\nsecondline") > > The best place to find options like lheight is in ?par Thanks - I had

Re: [R] Line spacing in graphics

2011-02-18 Thread Sarah Goslee
Peter, Try par()$lheight The catch is, you need to set it *before* the call to text() par(lheight=.8) # closer together text(x, y, "whatever\nsecondline") The best place to find options like lheight is in ?par Sarah On Fri, Feb 18, 2011 at 6:41 PM, Peter Langfelder wrote: > Hi all, > > tried

[R] Line spacing in graphics

2011-02-18 Thread Peter Langfelder
Hi all, tried to google but found nothing, so here goes the question: is there a way to control line spacing when displaying text in graphical mode (for example, using text())? As an example, run the following code: plot(c(0,1), c(0,1), type = "n", axes = FALSE, xlab = "", ylab = "") text(0.5, 0

Re: [R] incomplete final line

2011-02-18 Thread mipplor
yepp,i have done as you said and run my test. but it seems something wrong with "sources" file. what it does mean? > model1<‐siarmcmcdirichletv4(data,sources,tef,concdep=0,50,5) Error in the sources file - check this is numeric. Problems with inputs: siar has not been run. Warning mes

Re: [R] non-ascii characters in R output

2011-02-18 Thread Matt Shotwell
OK, looks like my web browser does render non-ascii characters output by R when it's given the encoding explicitly. This works for me: . So that's another solution, but not a general one. -Matt On Fri, 2011-02-18 at 12:47 -0600, Matt Shotwell wrote: > All, > > I'd like to automatically output te

[R] R2wd

2011-02-18 Thread rookie r user
Hi all, I'm currently trying to get accustomed to R and some of its packages, thus need some help for a package called R2wd. As I am trying to use the wdGET() function I'm getting the following message: Error in if (!(tmp[["ActiveDocument"]][["Name"]] == filename)) tmp$Open(paste("path", :

Re: [R] clustered bar chart help

2011-02-18 Thread Li, Qinghong, ST. LOUIS, NRC St. Louis Petcare
Sorry the data were all messed up. Let me try again. Can anyone help me to plot a chart graph? I have a data set like this. I would like a bar chart graph which mouse1's two treatments are clustered together, so on. I tried with barplot, but couldn't get it right. Mouse1 Mouse2 Mouse3

[R] breaks/bins question

2011-02-18 Thread Julie McWhorter
Thank you Joshua and Jim--I got the tick marks on finally! One last question: I am supposed to make bins in 1, 2 and 5 mm increments for fish up to 170 mm. I assume these are the breaks? So breaks = 170 for 1 mm and 340 for 2 mm and 1550 for 5 mm? I couldn't find any specific examples in the

Re: [R] segfault during example(svm)

2011-02-18 Thread Claudia Beleites
Dear Jürgen, I just tried update.packages (checkBuilt = TRUE), it did not solved the issue. Was just a guess. Nevertheless thanks, Bitte, bitte. In case that helps tracking down the problem: it works with my normal R as well as with r-devel. In case it helps you, I also put the installati

Re: [R] Means

2011-02-18 Thread Ted Harding
On 18-Feb-11 20:51:40, Dmitry Berman wrote: > Listers, > > Is there a command/function to get the population standard deviation > (N) and > the sample standard deviation (n-1) > > Thanks Using data (1:10), with N=10, as an example: c(SampSD=1, PopSD=sqrt(9/10))*sd((1:10)) # SampSDPopS

[R] Means

2011-02-18 Thread Dmitry Berman
Listers, Is there a command/function to get the population standard deviation (N) and the sample standard deviation (n-1) Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

Re: [R] segfault during example(svm)

2011-02-18 Thread Juergen Rose
Am Freitag, den 18.02.2011, 21:42 +0100 schrieb Claudia Beleites: > update.packages (checkBuilt = TRUE) Dear Claudia, I just tried update.packages (checkBuilt = TRUE), it did not solved the issue. Nevertheless thanks, Juergen __ R-help@r-project.org

Re: [R] segfault during example(svm)

2011-02-18 Thread Peter Ehlers
On 2011-02-18 12:32, Juergen Rose wrote: Am Freitag, den 18.02.2011, 11:53 -0800 schrieb Peter Ehlers: On 2011-02-18 11:16, Juergen Rose wrote: If do: library("e1071") example(svm) I get: svm> data(iris) svm> attach(iris) svm> ## classification mode svm> # default with factor res

Re: [R] segfault during example(svm)

2011-02-18 Thread Claudia Beleites
Dear Jürgen, did you update.packages (checkBuilt = TRUE) ? I recently had segfaults, too on 64bit linux (with rgl, though) and they disappeared only after updating with checkBuilt (including also the packages originally installed via Dirk's .deb packages. HTH, Claudia On 02/18/2011 09:32

Re: [R] segfault during example(svm)

2011-02-18 Thread Juergen Rose
Am Freitag, den 18.02.2011, 11:53 -0800 schrieb Peter Ehlers: > On 2011-02-18 11:16, Juergen Rose wrote: > > If do: > >> library("e1071") > >> example(svm) > > > > I get: > > > > > > svm> data(iris) > > > > svm> attach(iris) > > > > svm> ## classification mode > > svm> # default with factor res

Re: [R] question of elimination drawn lines on competing risk graph

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 2:10 PM, Gerard Smits wrote: Hi All, I am using the package, cmprisk, to plot competing risks. In my case, I have four lines showing risk of going on dialysis (by a lab test [fgf-23] in quartiles), where the 4 lower lines are for the competing risk of death. I am t

Re: [R] segfault during example(svm)

2011-02-18 Thread Peter Ehlers
On 2011-02-18 11:16, Juergen Rose wrote: If do: library("e1071") example(svm) I get: svm> data(iris) svm> attach(iris) svm> ## classification mode svm> # default with factor response: svm> model<- svm(Species ~ ., data = iris) svm> # alternatively the traditional interface: svm> x<

Re: [R] Bootstraps standard error

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 1:36 PM, danielepippo wrote: Hi everyone, if I have the bootsrap values of the parameters of my regression model, how can I calculate the standard error of them to refer to the parameters? The same way you would any other vector? Thank you -- View this message i

Re: [R] When is *interactive* data visualization useful to use?

2011-02-18 Thread Tom Hopper
Tal, One interactive capability that I have repeatedly wished for (but never taken the time to develop with the existing R tools) is the ability to interactively zoom in on and out of a data set, and to interactively create "call-outs of sections of the data. Much of the data that I deal with take

[R] clustered bar chart help

2011-02-18 Thread Li, Qinghong, ST. LOUIS, NRC St. Louis Petcare
Hi, Can anyone help me to plot a chart graph? I have a data set like this. I would like a bar chart graph which mouse1's two treatments are clustered together, so on. I tried with barplot, but couldn't get it right. Thanks Johnny Mouse1 Mouse2 Mouse3

[R] non-ascii characters in R output

2011-02-18 Thread Matt Shotwell
All, I'd like to automatically output text from R to HTML. In doing this I've run into trouble with non-ascii characters, as my browser (and presumably others) does not render such characters correctly. For example, the 'fancy' single quotes associated with summary.lm are multi-byte character

[R] Scaling Lattice Graphics for tikzDevice

2011-02-18 Thread Elliot Joel Bernstein
I'm trying to use lattice graphics to produce some small plots for inclusion in a LaTeX file. I want the LaTeX fonts to be used in the plots, but to be scaled down to match the size of the plot. I have written the following code to apply a scaling factor to all the "cex" and "padding" entries in

[R] Bootstraps standard error

2011-02-18 Thread danielepippo
Hi everyone, if I have the bootsrap values of the parameters of my regression model, how can I calculate the standard error of them to refer to the parameters? Thank you -- View this message in context: http://r.789695.n4.nabble.com/Bootstraps-standard-error-tp3313322p3313322.html Sent from

[R] segfault during example(svm)

2011-02-18 Thread Juergen Rose
If do: > library("e1071") > example(svm) I get: svm> data(iris) svm> attach(iris) svm> ## classification mode svm> # default with factor response: svm> model <- svm(Species ~ ., data = iris) svm> # alternatively the traditional interface: svm> x <- subset(iris, select = -Species) svm> y <- S

[R] question of elimination drawn lines on competing risk graph

2011-02-18 Thread Gerard Smits
Hi All, I am using the package, cmprisk, to plot competing risks. In my case, I have four lines showing risk of going on dialysis (by a lab test [fgf-23] in quartiles), where the 4 lower lines are for the competing risk of death. I am trying to edit the function to just plot the upper curves (

[R] How to calculate the perimeter and common border of polygons?

2011-02-18 Thread Leonardo Monasterio
Dear R-users, Is there any way of calculating the perimeter of a polygon in a shapefile object? Furthermore, how to calculate the length of the common border of two polygons? I've searched the code of spded, but could not find a hint on how to do it. Thank you very much, Leo. [[alternativ

Re: [R] plot3d, color points by group

2011-02-18 Thread Dieter Menne
Kari-4 wrote: > > > I've created a 3d scatterplot, and had no problems labeling the points. > However, I've been really struggling to change the color of the points > based > on a factor (see 'group' below). Is such a thing possible? > > Its always polite to make the example self-running by

[R] Is the Diebold Mariano Test in forecast package adjusted?

2011-02-18 Thread Paka yag
Hello I would like to know if the Diebold Mariano Test in the forecast Package is adjusted to small samples (as Harvey, Leybourne, Newbold suggest) If not, how can I do that manually? Paka __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] gaoshan

2011-02-18 Thread wang peter
i have got a svm MODEL from e1071 by svmModel<-svm(x, y, kernel = "linear", cost = gamma, scaled=FALSE) who can tell me how can i get the alpha of decision functions i just remembered rho is the bias of decision functions i think the manual of e1071 is a piece of usely garbage thank u gao shan

Re: [R] ERGM + Anova

2011-02-18 Thread Roger Gomes
Hi Bert, thanks about your answer. Well, I would like to calculate anova.ergm in R. Wich values (edges, vertices) the library use to calculate F values or p-value with graphos. The calculus is like a Pandora Box... I put there a network (ergm) and then, values show me like a magic. Do you know

Re: [R] sort a 3 dimensional array across third dimension ?

2011-02-18 Thread rex.dwyer
I was going to say: The problem with for-loops (as best I understand it) is that the R code gets interpreted over and over; what you normally want to do is design the computation so that you jump into the internals of R and stay there. But the inner loop is in the R internals of the sort in th

[R] hdf5 library install issue

2011-02-18 Thread Jerome
Dear all I'm trying to install the hdf5 library into R. The HDF5 package is installed in a special directory, distributed accross my cluster: /share/apps/HDF5 So i put the args option to the configure command as i read in previous post in the list: jerome]# R CMD INSTALL --configure-vars='

Re: [R] sort a 3 dimensional array across third dimension ?

2011-02-18 Thread jamaas
Thanks Claudia (and all others!0 This works beautifully! The instructions for aperm are a bit vauge! J -- View this message in context: http://r.789695.n4.nabble.com/sort-a-3-dimensional-array-across-third-dimension-tp3312612p3313126.html Sent from the R help mailing list archive at Nabble.co

[R] fit a distribution

2011-02-18 Thread Simone Gabbriellini
hello list, I have this array of distribution of frequencies: freq<-c(45,18,10,8,13,5,9,3,4,1,2,2,2,3,4,4,1,1,2,1,2,1,1,1,1,1,2,3,1,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) for this array of values: values<-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,18,19,20,21,

Re: [R] calculating means

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 9:45 AM, Mike Gibson wrote: I apologize if you have already seen my question. I am new to the mailing list and I did not get any responses the first time I posted my question. However, I am not sure my post went through. It didn't. Here is my situation: I have a s

Re: [R] How to flag those iterations which yield a warning?

2011-02-18 Thread William Dunlap
If you have a function that may produce warnings you can use withCallingHandlers() to make a new function that does what the original does but adds some contextual information to the usual warning report. E.g., addWarningReporting <- function(FUN) { force(FUN) function(args) { withCall

Re: [R] How to flag those iterations which yield a warning?

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 11:35 AM, Ravi Varadhan wrote: May be I could do: for (i in 1:nsim) { last.warning <- NULL # do model fitting if(!is.null(last.warning)) # discard simulation result You can raise warnings to behave as errors with options: options(warn=2) And you can define where R go

Re: [R] How to flag those iterations which yield a warning?

2011-02-18 Thread Ravi Varadhan
Nope - that does not work. The value of last.warning is not reset after the initial NULL. Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins Univers

[R] heatmap & cluster

2011-02-18 Thread Duke
Hi all, I am new to heatmap function in stats package, so any advice will be greatly appreciated. So I have a dataset that I want to draw a heatmap, for example: > dput(a) structure(c(-8.256023, -14.764429, -10.145779, -5.123104, -11.974729, -16.329029, -16.329029, -16.329029, -2.764114, -4.9

Re: [R] How to flag those iterations which yield a warning?

2011-02-18 Thread Ravi Varadhan
May be I could do: for (i in 1:nsim) { last.warning <- NULL # do model fitting if(!is.null(last.warning)) # discard simulation result } I think this might work. Any other ideas? Ravi. Ravi Varadhan, Ph.D. Assistant Profe

[R] How to flag those iterations which yield a warning?

2011-02-18 Thread Ravi Varadhan
Hi, I am running a simulation study with the survival::coxph. Some of the simulations result in problematic fits due to flat partial likelihood. So, you get the warning message: Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, ... : Loglik converged before

Re: [R] Dependency on R-Forge Package

2011-02-18 Thread Spencer Graves
I echo Prof. Ripley's and Jari Oksanen's concerns. I see two options in case the R-Forge package maintainer does not submit the package to CRAN: (1) Copy the function(s) you want from that package into your own. In such cases, I recommend you change the name of the functi

Re: [R] R script HELP!

2011-02-18 Thread Jonathan P Daily
Well, this script only shows the option settings, so I assumed that the string being used as your infile was formatted for R. As for how it will have to look for R to read it in, there are many ways to do this - I would start by reading "R Data Import/Export" that ships with every copy of R. As

[R] Bug in the function Variogram (package nlme) ?

2011-02-18 Thread Arnaud Mosnier
Dears UseRs, In Zuur's book (Mixed effects models and extensions in ecology with R), p 167, it is mentionned that the Variogram function (package nlme) scale the sill to 1. Here is the plot of the semi-variogram given by the Variogram function on my "lme" object. (http://imm.io/3OLe) Note that the

Re: [R] Matrix in R

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 9:32 AM, danielepippo wrote: but if in my function pp_ris2[i,j]=myfunction} must be the indexes 0-0,0-1,0-2,0-3, ? I came across a posting in r-help that called this package "blasphemy": http://cran.r-project.org/web/packages/Oarray/index.html -- David Winsemius

Re: [R] Matrix in R

2011-02-18 Thread David Winsemius
On Feb 18, 2011, at 9:32 AM, danielepippo wrote: but if in my function pp_ris2[i,j]=myfunction} must be the indexes 0-0,0-1,0-2,0-3, ? From a search of RSiteSearch() that started with with terms: zero matrix indexing http://finzi.psych.upenn.edu/R/Rhelp02/archive/39031.html http://

Re: [R] ERGM + Anova

2011-02-18 Thread Bert Gunter
What does this have to do with R? -- Bert On Fri, Feb 18, 2011 at 6:37 AM, Roger Gomes wrote: > > Hi All, > > I would like to know where to find technical papers to how calculate ANOVA > using ERGM. Which parameters and so on. Thanks. > -- > View this message in context: > http://r.789695.n4.nab

Re: [R] Matrix in R

2011-02-18 Thread Philipp Pagel
On Fri, Feb 18, 2011 at 06:32:01AM -0800, danielepippo wrote: > > but if in my function > pp_ris2[i,j]=myfunction} > must be the indexes 0-0,0-1,0-2,0-3, ? You'll have to take care of that yourself with a bit of index arithmetics. It's the same you encounter in C, if you are modelling somet

[R] Variogram (nlme) of a lme object - corSpatial element question

2011-02-18 Thread Arnaud Mosnier
Dear Users, >From previous analysis (semi-variograms using package gstat), I found spatial autocorrelation in my dataset. The best fitted model to this spatial correlation structure is the Gaussian model (Spherical, Exponential, Linear tested and comparison done by Sum of Square errors). So I used

Re: [R] calculating means

2011-02-18 Thread Bert Gunter
Have you read an Intro to R or, indeed, any R documentation? Perhaps you received no reply because you do not appear to have made an honest effort to answer the question for yourself. Maybe you should consider accessing R thru R Commander or one of the other R GUI's -- search CRAN for details. --

Re: [R] R script HELP!

2011-02-18 Thread whizevans
OK thanks Jonathon, I will have a go. Is the plotdir file technically my output file? Or what is this otherwise? Also, having never used R script before, is it not very good at reading data, may I have to alter my input file in excel first? Thanks -- View this message in context: http://r.789

Re: [R] {Spam?} Re: sort a 3 dimensional array across third dimension ?

2011-02-18 Thread Claudia Beleites
On 02/18/2011 04:11 PM, Maas James Dr (MED) wrote: Hi Claudia, It does help a lot, but not quite there yet ... I'm sure you are correct and is much appreciated, I need some sort of generalized form, actual arrays in my case are 3x3x1000. Do you suspect it could be done in one step with sapply?

Re: [R] sort a 3 dimensional array across third dimension ?

2011-02-18 Thread rex.dwyer
Although I suggested to someone else that for-loops be avoided, they are not in the inner loop in this code, and it's probably easier to understand than some sort of apply: a = array(round(100*runif(60)),dim=c(3,4,5)) a for (i in 1:dim(a)[1]) for (j in 1:dim(a)[2]) a[i,j,] = sort(a[i,j,]) a

[R] calculating means

2011-02-18 Thread Mike Gibson
I apologize if you have already seen my question. I am new to the mailing list and I did not get any responses the first time I posted my question. However, I am not sure my post went through. Here is my situation: I have a spreadsheet with columns of fish species (text) and length (numb

[R] Weights in bagged regression trees

2011-02-18 Thread Simon Gillings
Has anyone any experience of applying observational weights in bagging? I am performing regression trees (continuous data on bird abundance) and need to account for sampling intensity. In a single tree, i.e. a call of rpart, I can specify weights either by having a separate vector called weights

Re: [R] speed up the code

2011-02-18 Thread rex.dwyer
Yes, remove the call to intersect, and rely on the results of match to tell you whether there is an overlap. If there are any matches, all(is.na(index)) will be false. Read help for match. ?match -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.

[R] plot3d, color points by group

2011-02-18 Thread Kari
Hello I've created a 3d scatterplot, and had no problems labeling the points. However, I've been really struggling to change the color of the points based on a factor (see 'group' below). Is such a thing possible? My data look like this: food group x y z apple fruit 0.216 -0.11

[R] variance of model delta glm

2011-02-18 Thread Melen
hi everybody, i know it a quite complicate subject but someone might have the solution. I am doing a delta model coupling a binomial glm and a lognormal one. Using the Laurent correction I can predict mean values and I would like to know if you know how to predict the variance? Do you know the t

[R] ERGM + Anova

2011-02-18 Thread Roger Gomes
Hi All, I would like to know where to find technical papers to how calculate ANOVA using ERGM. Which parameters and so on. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/ERGM-Anova-tp3312792p3312792.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] problem running scripts

2011-02-18 Thread jose Bartolomei
Dear Uwe, Thanks for your time. Definitely something was bugging my script (my mistake). Since your replay I have been trying to find the bug, to a simple script :( , without success. Preparing a reply to post with data sample and the script, everything start to work normally. Sadl

[R] Matrix in R

2011-02-18 Thread danielepippo
Hi everyone, I'm building a matrix in R with a cycle for like this: pp_ris2=matrix(NA,6,6) for(i in 0:6){ for(j in 0:6){ if(i>j){ pp_ris2[i,j]=myfunction} else if(i==j){ print(c(i,j)) pp_ris2[i,j]=myfunction}

Re: [R] Matrix in R

2011-02-18 Thread danielepippo
but if in my function pp_ris2[i,j]=myfunction} must be the indexes 0-0,0-1,0-2,0-3, ? -- View this message in context: http://r.789695.n4.nabble.com/Matrix-in-R-tp3312748p3312780.html Sent from the R help mailing list archive at Nabble.com. __ R

Re: [R] sort a 3 dimensional array across third dimension ?

2011-02-18 Thread Maas James Dr (MED)
Hi Rex, Thanks, this is exactly what I want but have to do it with many big arrays ... thus if there were a way to do it with a vectorized function would it not be a lot more efficient? Much appreciated! J >Subject: RE: sort a 3 dimensional array across third dimension ? > >Although I suggest

Re: [R] Boundaries of R

2011-02-18 Thread Ben Bolker
Mike Marchywka hotmail.com> writes: > Duncan Murdoch: > > Vectors are limited to about 2 billion entries (2^31 - 1). Matrices are > > vectors, so that limit applies to the total count of entries. > > Dataframes are lists of vectors, so that limit applies separately to the > > numbers of rows and

Re: [R] sort a 3 dimensional array across third dimension ?

2011-02-18 Thread Claudia Beleites
Dear James, this is what I understood your sorting along the third dimension to be: > x <- array(c(9, 9, 7, 9, 6, 5, 4, 6, 2, 1, 3, 2), dim = list(2, 2, 3)) > y <- apply (x, 1:2, sort) > y , , 1 [,1] [,2] [1,]21 [2,]65 [3,]99 , , 2 [,1] [,2] [1,]32 [2

Re: [R] Matrix in R

2011-02-18 Thread Dieter Menne
danielepippo wrote: > >I'm building a matrix in R with a cycle for like this: > pp_ris2=matrix(NA,6,6) > for(i in 0:6){ > . > R is not like c, indexing starts with 1. Dieter -- View this message in context: http://r.789695.n4.nabble.com/Matrix-in-R-tp3312748p3312764.html Sent from

Re: [R] R script HELP!

2011-02-18 Thread Jonathan P Daily
It looks to me like when you assign ID_min and ID_max that you want them to be vectors. In R, this is accomplished by ?c. Example: ID_min <- c(976834501, 290018099.3145, 1000) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Ke

Re: [R] Boundaries of R

2011-02-18 Thread Mike Marchywka
> Date: Fri, 18 Feb 2011 08:39:05 -0500 > From: murdoch.dun...@gmail.com > To: mich...@aers.ca > CC: r-help@r-project.org > Subject: Re: [R] Boundaries of R > > On 18/02/2011 5:44 AM, Michael Holt wrote: > > Hello Everyone, > > > > I'm pretty new

[R] R script HELP!

2011-02-18 Thread whizevans
The following is my R script which I am struggling with to assess ICESat data..perhaps it is the ID_min or ID_max that is wrong? I don't know, any help would be greatly appreciated :( # OPTIONS - CHANGE THESE VARIABLES IF NEEDED\par ###

Re: [R] Boundaries of R

2011-02-18 Thread Duncan Murdoch
On 18/02/2011 5:44 AM, Michael Holt wrote: Hello Everyone, I'm pretty new to R and I'm trying to get some idea of the capabilities of the language. I work with some pretty large data sets and the consensus seems to be that R does not work well with big data. I've started talking to the guys at R

Re: [R] lm without intercept

2011-02-18 Thread Jan
Hi, thanks for your help. I'm beginning to understand things better. > If you plotted your data, you would realize that whether you fit the > 'best' least squares model or one with a zero intercept, the fit is > not going to be very good > Do the data cluster tightly around the dashed line? No, a

Re: [R] lm without intercept

2011-02-18 Thread Jan
Hello Achim, > Not quite. Consult your statistics textbook for the correct interpretation > of p-values. Under the null hypothesis of a true intercept of zero, it is > very likely to observe an intercept as large as 13.52 or larger. thank you for that help. I suppose the net doesn't have a detai

Re: [R] sort a 3 dimensional array across third dimension ?

2011-02-18 Thread Joshua Wiley
Dear Jim, This works for your small example. I was not exactly sure what you were sorting on. In my example, I sum all values at each level of the third dimension and sort by that sum. Of course, if there are many levels or the 2 dimensions being summed are quite large, this will be quite compu

Re: [R] how to incorporate prior base probabilities into binomial glmm

2011-02-18 Thread Ken Knoblauch
sprocket gmail.com> writes: > > > Hi, > > I am modeling a gen linear mixed model with binomial repeated measures > responses (y=cbind(correct/not correct)) of some individuals (id). > I have a 2X2 design (effort and costs) and another continuous independent > variable (scr). This will lead

Re: [R] reading a matlab file

2011-02-18 Thread Ken Knoblauch
Krijnen WP, Wim pl.hanze.nl> writes: > > Dear R-people, > > I am trying to read a matlab file, unfortunately without success. I enclosed the zipped file. > > Do you have an idea how to read this file by ReadMat package into the R system? > > Thanks for your time! > > Wim Krijnen > > I

Re: [R] lm without intercept

2011-02-18 Thread Jay Emerson
No, this is a cute problem, though: the definition of R^2 changes without the intercept, because the "empty" model used for calculating the total sums of squares is always predicting 0 (so the total sums of squares are sums of squares of the observations themselves, without centering around the sam

[R] sort a 3 dimensional array across third dimension ?

2011-02-18 Thread Maas James Dr (MED)
I'm attempting to sort a 3 dimensional array that looks like this > x , , 1 [,1] [,2] [1,]99 [2,]79 , , 2 [,1] [,2] [1,]65 [2,]46 , , 3 [,1] [,2] [1,]21 [2,]32 Such that it ends up like this > y , , 1 [,1] [,2] [1,]21

[R] how to incorporate prior base probabilities into binomial glmm

2011-02-18 Thread sprocket
Hi, I am modeling a gen linear mixed model with binomial repeated measures responses (y=cbind(correct/not correct)) of some individuals (id). I have a 2X2 design (effort and costs) and another continuous independent variable (scr). This will lead to something like this: mod.1<-lmer(y~effort+cost

Re: [R] lm without intercept

2011-02-18 Thread Mike Marchywka
Date: Fri, 18 Feb 2011 12:25:36 +0100 From: achim.zeil...@uibk.ac.at To: jrheinlaen...@gmx.de CC: r-help@r-project.org Subject: Re: [R] lm without intercept On Fri, 18 Feb 2011, Jan wrote: > Hi, > > I am not a statistics expert, so I have this ques

[R] Boundaries of R

2011-02-18 Thread Michael Holt
Hello Everyone, I'm pretty new to R and I'm trying to get some idea of the capabilities of the language. I work with some pretty large data sets and the consensus seems to be that R does not work well with big data. I've started talking to the guys at Revolution, but I need to get some outside opi

Re: [R] error in optim, within polr(): "initial value in 'vmmin' is not finite"

2011-02-18 Thread Ben Haller
An update for the benefit of the list/posterity: I resolved this issue by switching over to using the lrm() function of package rms. It seems to pick better starts, or something; in any case, it has been able to converge on a solution for every model I've tried, although for the most complex

  1   2   >