[R] Is there a way to force counters to be treated as "unsigned?"

2011-02-14 Thread David Wolfskill
I am acquiring some sampled data that is time-stamped (with a POSIXct). Some of the data is in the form of "counters" -- that is, what is interesting isn't value of a given counter at a given time, but the change in the counter from one sample to a later one. As the counters are only incremented,

[R] help with aggregate()

2011-02-14 Thread Sam Steingold
Hi, I am trying to aggregate some data and I am confused by the results. I load a data frame "all" from a csv file, and then I do: (FOO,BAR,X,Y come from the header line in the csv file, BTW, how do I rename a column?) byFOO <- aggregate(list(all$BAR,all$QUUX,all$X/all$Y), by

Re: [R] R, Ubuntu, package installation with non-zero exit status

2011-02-14 Thread B77S
also, I have 'r-base-dev' installed as well -- View this message in context: http://r.789695.n4.nabble.com/R-Ubuntu-package-installation-with-non-zero-exit-status-tp3305989p3306005.html Sent from the R help mailing list archive at Nabble.com. __ R-he

Re: [R] Analyzing dissimilarity ratings with Multidimensional Scaling

2011-02-14 Thread Luca Turchet
Hi Mike and all, thanks again. Actually your suggestion is a good way to print data in R, but unfortunately does not add any information to what I aready have on my table data. What I would like to see is how far are the trials from each others in terms of similarity. ...maybe I just need another

[R] R, Ubuntu, package installation with non-zero exit status

2011-02-14 Thread B77S
All: I have been looking through the string of posts regarding this same issue, but I haven't been able to fix this problem. I am running Ubuntu 10.4 64bit, R version 2.10.1 I cannot install certain packages (e.g. "vegetarian") and each time it says basically the same thing (regardless of the pa

[R] Parzen fractional degree of difference estimator

2011-02-14 Thread Fologo Dubois
Does R have a function for Parzen fractional degree of differencing estimator? I am referring to the non-parametric kernel density estimator set forth by Parzen in Parzen (1983) [[alternative HTML version deleted]] __ R-help@r-projec

Re: [R] A Math question

2011-02-14 Thread Steve Lianoglou
On Sun, Feb 13, 2011 at 4:47 PM, Maithula Chandrashekhar wrote: > Dear all, I admit this is not anything to do R and even with > Statistics perhaps. Strictly speaking this is a math related question. > However I have some reasonable feeling that experts here would come up > with some elegant sugge

Re: [R] Defining functions inside loops

2011-02-14 Thread Eduardo de Oliveira Horta
Hello again. Let me try something a little more intricate. Let's say instead of forcing evaluation of 'i' I'd want to force evaluation of a vector; for example: s <- c( 0.2, 0.45, 0.38, 0.9) f <- lapply(1:10, function(i)local({ force(i) ; function(x)x^2+s[i]})) rm(s) f[[1]](0.1) Error in f[[1]](0

Re: [R] A Math question

2011-02-14 Thread Tsjerk Wassenaar
Also, googling around one will find the question has been asked (and answered) already: http://ask.metafilter.com/25060/Whats-the-sum-of-all-integers Cheers, Tsjerk On Tue, Feb 15, 2011 at 1:33 AM, Kjetil Halvorsen wrote: > or even better: > > http://mathoverflow.net/ > > On Sun, Feb 13, 2011

Re: [R] A Math question

2011-02-14 Thread Kjetil Halvorsen
or even better: http://mathoverflow.net/ On Sun, Feb 13, 2011 at 8:02 PM, David Winsemius wrote: > > On Feb 13, 2011, at 4:47 PM, Maithula Chandrashekhar wrote: > >> Dear all, I admit this is not anything to do R and even with >> Statistics perhaps. Strictly speaking this is a math related quest

[R] hazard.ratio command:

2011-02-14 Thread Angel Russo
Hi All, In absence of any reply, I am posting a slightly modified question. What is "x" in hazard.ratio in the command below? example(hazard.ratio) binscores<-cut(scores.train,c(-1000,-1,1,1000),c("low","intermediate","high")) * hazard.ratio(x=?, surv.time=train$ProgFreeSurv, surv.event=train$

Re: [R] How to get warning about implicit factor to integer coercion?

2011-02-14 Thread Bill.Venables
Your complaint is based on what you think a factor should be rather than what it actually is andhow it works. The trick with R (BTW I think it's version 2.12.x rather than 12.x at this stage...) is learning to work *with* it as it is rather than making it work the way you would like it to do.

Re: [R] sem problem - did not converge

2011-02-14 Thread John Fox
Dear Felipe, Without the data or the input covariance or correlation matrix it's not possible to say much. sem() would have complained if the input moment matrix weren't positive-definite, so your check of the eigenvalues of the matrix isn't providing additional information. If you haven't al

Re: [R] MCMC glmm

2011-02-14 Thread Ben Bolker
garciap usal.es> writes: > I'm working with abundance data of some species, but containing too zero > values, and the factors are the ones typical in a BACI experiment > (Before-and-After-Control-Impact). Thus, these are two fixed factors. As the > data does not holds the normality and homogeneit

Re: [R] Test for equivalence

2011-02-14 Thread syrvn
Hi! first of all. Thank you all very much for your input. I am sorry but I haven't had yet the time to reply to all of your messages. I will give you a more detailed description of my problem within the next 2 days! Many thanks again. Best, syrvn -- View this message in context: http://r.7896

[R] Apply Function To Each Row of Matrix

2011-02-14 Thread Stuart Jaffe
Hi, I have a matrix with about 3000 rows, and 1 column. The contents of the matrix are stock symbols (IBM, AAPL, etc) for instance. I also have a function that takes a single stock symbol as an argument, parses the text of Google Finance and returns the related stock symbols that the page has l

Re: [R] CDF of Sample Quantile

2011-02-14 Thread Bentley Coffey
Yeah, I think that you don't understand me. You suggest: 1 - pnorm(Threshold,mean,sd) = Probability that rnorm(1,mean,sd) > Threshold I want to know: Probability that quantile(rnorm(n,mean,sd),prob) > Threshold I use rnorm() to simulate a sample of size n and then I compute the statistic from

Re: [R] txtProgressBar examples?

2011-02-14 Thread Greg Snow
Did you try running the examples on the help page ?txtProgressBar ? Basically the txtProgressBar command creates the progress bar, then in the loop the setTxtProgressBar command updates the amount of progress for that bar. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain He

Re: [R] How to get warning about implicit factor to integer coercion? Example.

2011-02-14 Thread Ista Zahn
Hi, thanks for the example. I agree that this is dangerous -- that is one of the reasons why I use (and teach others to use) merge() instead of relying on sorting when joining data.frames. table2$Subject <- rownames(table2) df2 <- merge(df, table2) will work, even when Subject is stored as a char

Re: [R] Return list of data frames.

2011-02-14 Thread Ista Zahn
Hi Alberto, I don't think the error is coming from the code you've shown us (although quoting the list names is a little strange). This works for me: f <- function() { df.a <- data.frame(x=sample(letters, 100, replace=TRUE), y=rnorm(100)) df.b <- data.frame(z=factor(letters), y = factor(1

Re: [R] Bron-Kerbosch algorithm

2011-02-14 Thread Peter Ehlers
On 2011-02-14 11:50, Kjetil Halvorsen wrote: You could have tried to type RSiteSearch("Bron-Kerbosch") into R. As it is, that does not give any hits. Try it without the hyphen and you're pointed to the RBGL package. Peter Ehlers But in packages graph or igraph (on CRAN) there should be some

Re: [R] How to get warning about implicit factor to integer coercion? Example.

2011-02-14 Thread WB Kloke
Ista Zahn psych.rochester.edu> writes: > > Hi, > I think an example would be helpful. I'm not sure what behavior you > are referring to. > > best, Here is an example: If a data.frame of experimental results is read from an external file, a column of strings, e.g. subject codes, is converted t

[R] problem running scripts

2011-02-14 Thread jose Bartolomei
Dear all, I have encounter an odd situation. I have various R scripts interconnected via the source () function. After examining the results I noticed that not all the functions or procedures within a script were adequately conducted. Especially with the longest script ( about 180 lines)

Re: [R] Bron-Kerbosch algorithm

2011-02-14 Thread Kjetil Halvorsen
You could have tried to type RSiteSearch("Bron-Kerbosch") into R. As it is, that does not give any hits. But in packages graph or igraph (on CRAN) there should be some algorithm. Kjetil On Mon, Feb 14, 2011 at 4:33 PM, Yan Jiao wrote: > Dear R users > > > > I need to solve the finding all cliqu

Re: [R] How to group data by day

2011-02-14 Thread Mikhail Titov
It depends what would you like to get at the end. Perhaps you don't necessary need this type of numbering. For instance, if you'd like to calculate daily average. london$id <- as.Date(london$id) For sum by day you could use, let's say, this aggregate(words~id,london,FUN=sum) If you really want

[R] Bron-Kerbosch algorithm

2011-02-14 Thread Yan Jiao
Dear R users I need to solve the finding all cliques in a graph problem, is there a R package implementing Bron-Kerbosch algorithm? Many thanks YAn ** This email and any files transmitted with it are confide...{{dropp

Re: [R] CDF of Sample Quantile

2011-02-14 Thread Duncan Murdoch
On 14/02/2011 9:58 AM, Bentley Coffey wrote: I need to calculate the probability that a sample quantile will exceed a threshold given the size of the iid sample and the parameters describing the distribution of each observation (normal, in my case). I can compute the probability with brute force

Re: [R] sem problem - did not converge

2011-02-14 Thread Jeremy Miles
You have a fairly large and complex model there. This sort of model (almost) always causes problems. I would try fitting one factor at a time. That might help you to narrow down the problem. If one factor doesn't converge, the whole model won't converge. You might also consider joining the str

Re: [R] CDF of Sample Quantile

2011-02-14 Thread Jonathan P Daily
If I understand this, you have a value x, or a vector of values x, and you want to know the CDF that this value is drawn from a normal distribution? I assume you are drawing from rnorm for your simulations, so look at the other functions listed when you ?rnorm. HTH -

Re: [R] Analyzing dissimilarity ratings with Multidimensional Scaling

2011-02-14 Thread Mike Marchywka
> Date: Mon, 14 Feb 2011 17:55:50 +0100 > Subject: Re: [R] Analyzing dissimilarity ratings with Multidimensional > Scaling > From: turchet.l...@gmail.com > To: marchy...@hotmail.com > CC: r-help@r-project.org > > Dear Mike, > thanks a lot for your answer.

[R] Transforming relational data

2011-02-14 Thread mathijsdevaan
Hi, I have a large dataset with info on individuals (B) that have been involved in projects (A) during multiple years (C). The dataset contains three columns: A, B, C. Example: A B C 1 1 a 1999 2 1 b 1999 3 1 c 1999 4 1 d 1999 5 2 c 2001 6 2 d 2001 7 3 a 2004 8 3 c 2004 9

[R] How to group data by day

2011-02-14 Thread Michela Ferron
Hi everybody, I'm a beginner in R and I'm having a hard time grouping my data by day. The data are in this format: id; words 2005-07-07T09:59:56Z; 35 2005-07-07T10:01:39Z; 13 2005-07-08T10:02:22Z; 1 2005-07-09T10:03:16Z; 23 2005-07-10T10:04:23Z; 39 2005-07-10T10:04:39Z; 15 I've transformed the d

Re: [R] Analyzing dissimilarity ratings with Multidimensional Scaling

2011-02-14 Thread Luca Turchet
Dear Mike, thanks a lot for your answer. Unfortunately the way you kindly suggested is not suitable to solve my problem. Indeed as said, I need to display the distances between the proposed trials, for example I would like to see a 2D plot where I can see how fare is the trial MT-MT from the trial

[R] R not working after loading lattice

2011-02-14 Thread Rita Carreira
Hello! Happy Valentine's Day... After I loaded the package lattice in R, it did not work. Then when I closed R and restarted it, R started with an error message and here is the feedback that I got from the R Console: Loading required package: Hmisc Loading required package: survival Loading re

[R] txtProgressBar examples?

2011-02-14 Thread Scott Chamberlain
Dear R users, I am curious if someone could direct me towards websites/tutorials for uses of progress bars (especially) in R. I can't seem to figure them out. Thanks very much, Scott [[alternative HTML version deleted]] __ R-help@r-projec

[R] sem problem - did not converge

2011-02-14 Thread Felipe Bhering
Someone can help me? I tried several things and always don't converge I am making a confirmatory factor analysis model. # Model library(sem) dados40.cov <- cov(dados40,method="spearman") model.dados40 <- specify.model() F1 -> Item11, lam11, NA F1 -> Item31, lam31, NA F1 -> Item36, lam36, NA F1

[R] Parzen estimator of fractional degree of difference, d

2011-02-14 Thread Fologo Dubois
Does R have a function for Parzen degree of differencing estimator? I am referring to the non-parametric kernel density estimator set forth by Parzen in Parzen (1983) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

[R] sem problem - did not converge

2011-02-14 Thread Felipe Bhering
Someone can help me? I tried several things and always don't converge I am making a confirmatory factor analysis. # Model library(sem) dados40.cov <- cov(dados40,method="spearman") model.dados40 <- specify.model() F1 -> Item11, lam11, NA F1 -> Item31, lam31, NA F1 -> Item36, lam36, NA F1 -> I

Re: [R] censReg or tobit: testing for assumptions in R?

2011-02-14 Thread E Hofstadler
Thanks for your response! Terry Therneau wrote: I assume you mean "survreg" in the survival package. It's a shame that censored gaussian regression has earned a unique label (tobit) that makes people think it is something so very different. (yes, what I meant was the function tobit() from t

[R] sem problem - did not converge

2011-02-14 Thread Felipe Bhering
Someone can help me? I tried several things and always don't converge # Model library(sem) dados40.cov <- cov(dados40,method="spearman") model.dados40 <- specify.model() F1 -> Item11, lam11, NA F1 -> Item31, lam31, NA F1 -> Item36, lam36, NA F1 -> Item54, lam54, NA F1 -> Item63, lam63, NA F1

[R] Spatstat - envelope, Thomas process and Cramer-von Mises

2011-02-14 Thread Jeff Fang
Hi all, I am using "spatstat" to investigate the spatial structure of some plant populations, and I want to detect these patters with IPP and a Thomas process based on pair-correlation function. I know the function "pcfinhom" is available to characterize the IPP, but I have no idea about how to us

Re: [R] RCytoscape setPosition error

2011-02-14 Thread Paul Shannon
Hi Fahim, There is an easily resolved omission in the sample code you sent. Please note the the 3rd line below, 'displayGraph', which does not appear in your email. This method transmits your graph from R to Cytoscape, creating a Cytoscape network. cw <- CytoscapeWindow ('smallExample'

Re: [R] how to order POSIXt objects ?

2011-02-14 Thread Mike Marchywka
> Date: Mon, 14 Feb 2011 00:55:12 -0800 > From: jon_d_co...@yahoo.co.uk > To: r-help@r-project.org > Subject: [R] how to order POSIXt objects ? > > > I have a problem ordering by descending magnitude a POSIXt object. Can > someone help please and let me

[R] CDF of Sample Quantile

2011-02-14 Thread Bentley Coffey
I need to calculate the probability that a sample quantile will exceed a threshold given the size of the iid sample and the parameters describing the distribution of each observation (normal, in my case). I can compute the probability with brute force simulation: simulate a size N sample, apply R's

[R] Error en lm.fit NA/NaN/Inf en llamada a una función externa

2011-02-14 Thread agent dunham
Hello, I am new with R, and I'm trying to fit a linear model, I did the following and obtein this result, can anybody help? Thanks, > logdftodos7925vi <- log(dftodos7925vi) > logALTURA7925<- log(dftodos7925$ALTURA7917) > logtodos7925.lm <- lm (logALTURA7925~., data= logdftodos7925vi) Error en l

[R] Return list of data frames.

2011-02-14 Thread Alberto Negron
Hi, I've got a problem with a function trying to return 2 data frames in a list. The code is as follow: function(x) { # code MyList<- list("a"=df.a,"b"=df.b) return(MyList) } and I got the following message: Error in list_to_dataframe(res, attr(.data, "split_labels")) : Results must be

Re: [R] How can I slightly offset plots?

2011-02-14 Thread David Winsemius
On Feb 14, 2011, at 12:19 PM, Greg Snow wrote: Those types of plots can be very hard to read. A better approach would be to look at the lattice package or faceting in the ggplot2 package. This is the lattice example: http://lmdvr.r-forge.r-project.org/figures/figures.html http://dsarkar.f

Re: [R] autocorrelaltion function plots

2011-02-14 Thread Peter Ehlers
In reply to a question from Fangyi He re the confidence limit lines in an acf plot, On 2011-02-13 22:06, BSanders wrote: I believe it's actually 2/sqrt(n) where n is the sample size... Interesting.. The question was actually about the default confidence level, which is 0.95 (see ?plot.acf

Re: [R] How can I slightly offset plots?

2011-02-14 Thread Greg Snow
Those types of plots can be very hard to read. A better approach would be to look at the lattice package or faceting in the ggplot2 package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r

Re: [R] how to order POSIXt objects ?

2011-02-14 Thread Jeff Newmiller
a) POSIXt represents the idea of a datetime. POSIXct is a compact representation (number of seconds since 1970-01-01 00:00:00 GMT) of this idea. POSIXlt is an inefficient but convenient representation (using nine separate components) of this idea. Either POSIXct or POSIXlt may be treated as a P

Re: [R] xyplot text sizing

2011-02-14 Thread Greg Snow
Modifying the 4th example on the help page for tkexamp (TeachingDemos package) may help with exploring the effects of the different parameters and deciding on a set to use. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 >

Re: [R] how to overlay a map of US on image plot

2011-02-14 Thread Greg Snow
You may want to use the ggplot2 package for this (see ?coord_map), it can combine maps and other plots and does a lot of the thinking about scaling and projections for you. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 >

Re: [R] Test for equivalence

2011-02-14 Thread Albyn Jones
Reading the original post it was clear to me that the poster was looking for a test of equivalence, but obviously there was room for interpretation! albyn On Mon, Feb 14, 2011 at 09:46:13AM -0700, Greg Snow wrote: > Reading the original post it is fairly clear that the original poster's > questi

Re: [R] how to order POSIXt objects ?

2011-02-14 Thread jim holtman
Thanks. I did not even know about that function; will have to use it in the future. That is the good news/bad news about R; so many things to learn about. On Mon, Feb 14, 2011 at 11:58 AM, Prof Brian Ripley wrote: > See the help page for order.  It has a similar example, and the general > solu

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

2011-02-14 Thread Greg Snow
There are some interactive graphics tools in the TeachingDemos package (tkBrush allows brushing, tkexamp helps you create your own interactive graphics, etc.). There are also the iplots package, the rgl package (spinning in 3 dimonsions), 'tkrplot' package, the fgui package, the playwith package

Re: [R] how to order POSIXt objects ?

2011-02-14 Thread Prof Brian Ripley
See the help page for order. It has a similar example, and the general solution is to use xtfrm, not unclass. On Mon, 14 Feb 2011, jim holtman wrote: 'unclass' it first(assuming that it is POSIXct) -unclass(mytime) On Mon, Feb 14, 2011 at 3:55 AM, JonC wrote: I have a problem ordering by

Re: [R] Newb Prediction Question using stepAIC and predict(), is R wrong?

2011-02-14 Thread Greg Snow
There is a section on environments on the help page ?formula, but that may not be completely clear to newer users. Basically the idea is that when you specify a formula, the default place that R will look for the variables in the formula is the data or newdata argument. So if you use those pro

Re: [R] conditional value assignment

2011-02-14 Thread Frank Tamborello
ifelse worked like a charm for this newbie. Thanks, Dennis! -Frank On Feb 14, 2011, at 3:39 AM, Dennis Murphy wrote: > Hi: > > Wouldn't ifelse() work here? > > tco <- with(df, ifelse(TargetColor == 'B', CannonOriB, CannonOriR)) > > ifelse() is vectorized, so there should be no need for a loop

Re: [R] Test for equivalence

2011-02-14 Thread Greg Snow
Reading the original post it is fairly clear that the original poster's question does not match with the traditional test of equivalence, but rather is trying to determine "distinguishable or indistinguishable". If the test in my suggestion is statistically significant (and note I did not sugge

Re: [R] Optimization Question

2011-02-14 Thread Ravi Varadhan
Hi Gabriel, I played with your problem a little bit. I tried both "optimx" and also the Nelder-Mead function from my recent package "dfoptim". The log-likelihood is minimized at -Inf. Therefore, I think that either there is a mistake in the way your likelihood is coded, or that your model is fl

[R] Problems with "Ctrl+r" on Dell machines

2011-02-14 Thread Dimitri Liakhovitski
Hello! I and my friend have the latest R version (2.12.1). She has a Dell laptop and I have a Dell desktop. Both of us have problems with using "Ctrl+r" when we are trying to run in a selection in R (regular R script). Sometimes it runs, but frequently it does not run at all, so that one has to hi

Re: [R] Confidence interval

2011-02-14 Thread Peter Ehlers
On 2011-02-13 18:31, Joshua Wiley wrote: Hi, The logical operators are actually vectorized, so I do not think you need a loop. Does this do what you want? ## Some data set.seed(10) dat<- matrix(rnorm(500, sd = 3), nrow = 80) ## Hypothetical confidence interval ci<- c(-5, 5) ## Find the numbe

[R] sem problem - did not converge

2011-02-14 Thread Felipe
Someone can help me? I tried several things and always don't converge I am making a confirmatory factor analysis model # Model library(sem) dados40.cov <- cov(dados40,method="spearman") model.dados40 <- specify.model() F1 -> Item11, lam11, NA F1 -> Item31, lam31, N

[R] fit two-parameter lognormal distribution, l-moments

2011-02-14 Thread Tonja Krueger
Dear R helpers, I would like to fit a two-parameter lognormal distribution to my data using l-moments. Is there a package that provides this feature? I used the “lmom”-package to fit the three-parameter lognormal distribution to my data as shown beneath. I would like something similar for the

Re: [R] Optimization Question

2011-02-14 Thread Ravi Varadhan
Your function is non-smooth and nasty looking. You might want to set the function value to a large positive number if an illegal arithmetic operation is performed and `NaN' is returned. fn <- function(p) { ftemp <- 263*log(sqrt(2*pi)*sd(test$A))+ sum(log(abs(c(test$A[-1], 1))^p[3])) + (sum(((te

Re: [R] how to order POSIXt objects ?

2011-02-14 Thread Hadley Wickham
It's a bit better to use xtfrm. Hadley On Monday, February 14, 2011, jim holtman wrote: > 'unclass' it first(assuming that it is POSIXct) > > -unclass(mytime) > > On Mon, Feb 14, 2011 at 3:55 AM, JonC wrote: >> >> I have a problem ordering by descending magnitude a POSIXt object. Can >> someone

Re: [R] Regular Expression

2011-02-14 Thread Gabor Grothendieck
On Mon, Feb 14, 2011 at 4:13 AM, Deb Midya wrote: > Hi R users, > > Thanks in advance. > > I am using R-2.12.1 on Windows XP. > > I am looking for some good literature on Regular Expression. May I request > you to assist me please. There are regular expression links on the gsubfn home page: http

Re: [R] how to order POSIXt objects ?

2011-02-14 Thread jim holtman
'unclass' it first(assuming that it is POSIXct) -unclass(mytime) On Mon, Feb 14, 2011 at 3:55 AM, JonC wrote: > > I have a problem ordering by descending magnitude a POSIXt object. Can > someone help please and let me know how to work around this. My goal is to > be able to order my data by DATE

[R] R 2.12.2 scheduled for February 25

2011-02-14 Thread Peter Dalgaard
This is to announce that we plan to release R version 2.12.2 on Friday, February 25, 2011. (Mainly to sort out complex arithmetic issues with some compiler platforms.) Those directly involved should review the generic schedule at http://developer.r-project.org/release-checklist.html The source t

Re: [R] How to get warning about implicit factor to integer coercion?

2011-02-14 Thread Ista Zahn
Hi, I think an example would be helpful. I'm not sure what behavior you are referring to. best, Ista On Mon, Feb 14, 2011 at 5:31 AM, WB Kloke wrote: > Is there a way in R (12.x) to avoid the implicit coercion of factors to > integers > in the context of subscripts? > > If this is not possible,

Re: [R] saving plots

2011-02-14 Thread Philipp Pagel
On Mon, Feb 14, 2011 at 12:59:13PM +0530, km wrote: > Hi all, > > Is there a way to save the currently displayed plot to an image format just > after we view it? > I think this would be more intuitive as a user if I wish to save it just > after I visualize the plot. > > I am aware that we need t

Re: [R] censReg or tobit: testing for assumptions in R?

2011-02-14 Thread Terry Therneau
> I'm thinking of applying a censored regression model to > cross-sectional data, using either the tobit (package survival) or the > censReg function (package censReg). The dependent variable is left and > right-censored. I assume you mean "survreg" in the survival package. It's a shame that cen

Re: [R] Optimal Y>=q cutoff after logistic regression

2011-02-14 Thread Viechtbauer Wolfgang (STAT)
That's definitely one for the fortune package! Wolfgang > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Frank Harrell > Sent: Monday, February 14, 2011 14:50 > To: r-help@r-project.org > Subject: Re: [R] Optimal Y>=q cutoff af

Re: [R] Analyzing dissimilarity ratings with Multidimensional Scaling

2011-02-14 Thread Mike Marchywka
> My first goal in the analysis process is to print a perceptual map where to > place the pairs of > audio-visual stimuli (e.g. WD-WD, MT-DL, etc.) and see how far the trials > are from each other. I've been using heatmap for stuff like this. You can get a nice picture this way and get quick vi

[R] MCMC glmm

2011-02-14 Thread garciap
Hi to all the people, I'm working with abundance data of some species, but containing too zero values, and the factors are the ones typical in a BACI experiment (Before-and-After-Control-Impact). Thus, these are two fixed factors. As the data does not holds the normality and homogeneity of varian

Re: [R] Optimal Y>=q cutoff after logistic regression

2011-02-14 Thread Frank Harrell
It is very seldom that such a cutoff is real and validates in another dataset. As described so well in Steyerberg's book Clinical Prediction Modeling there are many good ways to present models to non-statisticians. Nomograms and calibration curves with histograms of predicted probabilities are t

Re: [R] Using filled.contour and contour functions together

2011-02-14 Thread Xavier Bodin
Thanks to you, and to David Winsemius who replied, I finally found a solution, which works pretty fine : filled.contour(x,y,z, plot.axes = {axis(1); axis(2) ; contour(x,y,z2, add = T); contour(x,y,z2, nlevels = 1, level = 0, add = T, lwd = 1.5)}) Xavier -- View this message in context: http:/

[R] Analyzing dissimilarity ratings with Multidimensional Scaling

2011-02-14 Thread Luca Turchet
Dear R-list members, I need an help with the Multidimensional Scaling analysis (MDS). So far I used the cmdscale() command in R, but I did not get the perceptual map I would love to see, and I would like to know if it is possible to get it using R, and if yes how. I also had a look to the functions

[R] package rgl installation failure due to png

2011-02-14 Thread xian-1 . zhang
Dear R list, I am having problem installing the package rgl on a redhat system. System info: Linux lci4.eu.novartis.net 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux R sessionInfo(): R version 2.12.1 (2010-12-16) Platform: x86_64-unknown-linux-gnu (64-bit)

[R] Regular Expression

2011-02-14 Thread Deb Midya
Hi R users,   Thanks in advance.   I am using R-2.12.1 on Windows XP.   I am looking for some good literature on Regular Expression. May I request you to assist me please. Once again, thank you very much for the time you have given.   Regards,   Deb   [[alternative HTML version d

[R] How to get warning about implicit factor to integer coercion?

2011-02-14 Thread WB Kloke
Is there a way in R (12.x) to avoid the implicit coercion of factors to integers in the context of subscripts? If this is not possible, is there a way to get at least a warning, if any coercion of this type happens, given that the action of this coercion is almost never what is wanted? Of course,

[R] how to order POSIXt objects ?

2011-02-14 Thread JonC
I have a problem ordering by descending magnitude a POSIXt object. Can someone help please and let me know how to work around this. My goal is to be able to order my data by DATE and then by descending TIME. I have tried to include as much info as possible below. The problem stems from trying to

[R] Optimization Question

2011-02-14 Thread Gabrielsen, Alexandros
Hi all, This is my first optimization code and am receiving the following error for the following function: fn <- function(p) { +263*log(sqrt(2*pi)*sd(test$A))+ sum(log(abs(c(test$A[-1], 1))^p[3])) + (sum(((test$A-p[1]+(p[2]+1)*c(test$A[-1], 1)))^2)/sum(sd(test$A)*(abs(c(test$A[-1], 1))^p[3])

Re: [R] RCytoscape setPosition error

2011-02-14 Thread Martin Morgan
On 02/13/2011 11:28 AM, Fahim M wrote: > Hi > Can some one please point out where i am wrong. > > I am trying to position set of nodes column-wise in cytoscape using > RCytoscape > AD > BE > CF Hi Fahim -- please ask questions about Bioconductor packages on the Bioconductor mailing li

Re: [R] problem in installing Rattle in R 2.12.1.0

2011-02-14 Thread Prof Brian Ripley
On Mon, 14 Feb 2011, taby gathoni wrote: Hi all, Please help, I am getting an error when I try installing rattle. Error in as.GType(type) : Cannot convert RGtkBuilder to GType How? From the sources? Since you appear to be using Windows (unstated), from binary packages? Which versions,

Re: [R] How can I slightly offset plots?

2011-02-14 Thread Sarah Goslee
Carly, Those aren't just slightly offset, that's a 3D plot. You might look into some of the 3D plotting packages for R, maybe scatterplot3d? Sarah On Mon, Feb 14, 2011 at 7:45 AM, Carly Huitema wrote: > Dear R help contributers, > > I have several x,y scatter plots and I would like to plot them

Re: [R] Adding labels into lattice's barchart

2011-02-14 Thread Deepayan Sarkar
On Mon, Feb 14, 2011 at 5:16 PM, Luca Meyer wrote: > Thanks Deepayan, > > What you suggest is quite fine, but provides the overall number of cases for > the entire dataset splitted into V2 levels. > > What about if I need to show panel specific's values? For instance I want to > show not the tot

[R] How can I slightly offset plots?

2011-02-14 Thread Carly Huitema
Dear R help contributers, I have several x,y scatter plots and I would like to plot them slightly offset, similar to: http://www.mathworks.com/matlabcentral/fx_files/24368/2/content/style4.jpg I've looked all over for this answer with no luck. Just a function name or previous example would probab

Re: [R] how to improve the precison of this calculation?

2011-02-14 Thread Mike Marchywka
[ anyone know how to get hotmail to consistently mark original text? Now its hanging my keyboard in firefox  LOL ] Anyway, I think I was the one advocating these approaches over things like indefinite length calculations and I punted the R questions to others but I'm not real sure what you ar

Re: [R] Using filled.contour and contour functions together

2011-02-14 Thread Jannis
You should start reading the documentation of the functions you use. ?filled.contour gives you the following: ...The output produced by |filled.contour| is actually a combination of two plots; one is the filled contour and one is the legend. Two separate coordinate systems are set up for these

Re: [R] rjava does not install

2011-02-14 Thread Mike Marchywka
[ stupid hotmail still not mark original, top post. I can't figure out when it is kind enough to do this and not, probably thinks I need to use html LOL ] The point seems to be that you need jni.h which apparently is only in the jdk, not the jre. If you install "java" it isn't clear what this

[R] problem in installing Rattle in R 2.12.1.0

2011-02-14 Thread taby gathoni
Hi all, Please help, I am getting an error when I try installing rattle. Error in as.GType(type) : Cannot convert RGtkBuilder to GType I have already installed gtk-2.12.9-win32-2  and gtk2-runtime-2.22.0-2010-10-21-ash and restarted R as instructions require. Please assist me Taby

Re: [R] Adding labels into lattice's barchart

2011-02-14 Thread Luca Meyer
Thanks Deepayan, What you suggest is quite fine, but provides the overall number of cases for the entire dataset splitted into V2 levels. What about if I need to show panel specific's values? For instance I want to show not the total number of Female but the total number of Female in 1st Class

Re: [R] Adding labels into lattice's barchart

2011-02-14 Thread Luca Meyer
Thanks Deepayan, What you suggest is quite fine, but provides the overall number of cases for the entire dataset splitted into V2 levels. What about if I need to show panel specific's values? For instance I want to show not the total number of Female but the total number of Female in 1st Class

Re: [R] xyplot text sizing

2011-02-14 Thread Jannis
Trellis graphs can be a pain regarding their parameters ;-) Try to run trellis.par.get() after you produced the plots and try to figure out (by playing around with them) which parameter corresponds to your text size (I would guess some of the par.sub.text or par.main.text parameters). Use

Re: [R] how to overlay a map of US on image plot

2011-02-14 Thread Jannis
A First guess would be to have a look at ?map and change the 'add' argument to TRUE. This would overlay the map to the image plot that you produced before. It may be that you need to mess around with different projections etc. but I can not give you any advice on that without digging deep into

Re: [R] (no subject)

2011-02-14 Thread Jannis
First of all I would advice you to use meaningful subjects when posting to the list. My second point is only a vague guess, but if you use the exact code that you posted there may be bracket missing(its the closing bracket of the jpg() call ). May this produce your error? Third, you shou

Re: [R] Adding labels into lattice's barchart

2011-02-14 Thread Deepayan Sarkar
On Wed, Feb 9, 2011 at 11:04 PM, Luca Meyer wrote: > *** APOLOGIZES FOR THOSE READING THE LIST THROUGH NABBLE THIS WAS ALREADY > POSTED THERE BUT NOT FORWARDED TO THE LIST FOR SOME UNKNOWN REASON *** > > I have a dataset that looks like: > > $ V1: factor with 4 levels > $ V2: factor with 4 levels

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

2011-02-14 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/14/2011 11:21 AM, Gesmann, Markus wrote: > Hi Rainer, > > You may want to look into the package googleVis, which provides an > interface between the Google Visualisation API and R, see > http://code.google.com/p/google-motion-charts-with-r/ Tru

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

2011-02-14 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/11/2011 08:21 PM, Claudia Beleites wrote: > Dear Tal, dear list, > > I think the importance of interactive graphics has a lot do with how > visual your scientific discipline works. I'm spectroscopist, and I think > we are very visually oriented:

  1   2   >