Re: [R] as.character ()

2008-03-31 Thread Bill.Venables
An older alternative uses format() > x <- c(2.00, 1.20, 5.00, 6.56) > format(x) [1] "2.00" "1.20" "5.00" "6.56" -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jim holtman Sent: Tuesday, 1 April 2008 7:48 AM To: benlafleche Cc: R-help@r-project.org Subj

Re: [R] garch prediction

2008-03-31 Thread Spencer Graves
Hi, Yohan: Please correct any misstatements I make in the the following. Thanks. Fernandito: I find it easier to consider a self-contained example, such as the following extension of the examples in ?garchFit and ?predict.fGARCH: library(fGarch) spec = garchSpec() x = garchSim(mode

Re: [R] Dendrogram orientation

2008-03-31 Thread Gabor Grothendieck
Try: plot(as.dendrogram(dd1), horiz = TRUE, nodePar = list(lab.cex = .4)) On Thu, Mar 27, 2008 at 1:08 PM, Lassana TOURE <[EMAIL PROTECTED]> wrote: > I am using the two functions hclust and plot to draw a dendrogram. The > result is a vertical dendrogram , but I prefer a horizontal one. > > Need

[R] garch prediction

2008-03-31 Thread fernandito
Hello I want to predict the future values of time series with Garch When I specified my model like this: library(fGarch) ret <- diff(log(x))*100 fit = garchFit(~arma(1,0,0)+garch(1, 1), data =ret) predict(fit, n.ahead = 10) meanForecast meanError standardDeviation 10.01371299 0.03086350

Re: [R] Comparing Time Series

2008-03-31 Thread nathan3073
Hai Ingmar, nice to see you again. well, I consider time series as the most important aspect in my experiment. ANOVA can only show whether the mean are different, and combined with Turkey HSD, the greatest they can do is showing the difference for each pair of subject. Time Series in other side, c

Re: [R] download.file error

2008-03-31 Thread jim holtman
?try On Mon, Mar 31, 2008 at 6:26 PM, CHIB CO <[EMAIL PROTECTED]> wrote: > Dear all, > > I am looking for a way to work out if a file on the internet exists before > attempting to download it using the function download.file(). For example, > using a url that does not exist > > url <- "http://fin

[R] download.file error

2008-03-31 Thread CHIB CO
Dear all, I am looking for a way to work out if a file on the internet exists before attempting to download it using the function download.file(). For example, using a url that does not exist url <- "http://finance.yahoo.com/ftse.csv"; destfile <- tempfile() download.file(url = url, destfile = d

Re: [R] question about levelplot panel arrangement

2008-03-31 Thread Deepayan Sarkar
On 3/31/08, Jimin Pei <[EMAIL PROTECTED]> wrote: > The default arrangement of multiple panels in a lattice plot is from > bottom left to top right. Are there any ways to change that, for example, > from top left to bottom right? Thank you. Add as.table=TRUE to your call. -Deepayan __

Re: [R] Memory in R.

2008-03-31 Thread Liviu Andronic
Hello Amadou, On Mon, Mar 31, 2008 at 4:53 PM, R RR <[EMAIL PROTECTED]> wrote: > 1 - I want to increase memory, but I can't find > the right way. E.g: in stata, you just type "set memory 1g". > When I try to load huge datasets, R crashes. You will find this recent thread [1] interesting. You'd

[R] question about levelplot panel arrangement

2008-03-31 Thread Jimin Pei
The default arrangement of multiple panels in a lattice plot is from bottom left to top right. Are there any ways to change that, for example, from top left to bottom right? Thank you. J.P. __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

[R] GeoDa spdep

2008-03-31 Thread Steve Schachterle
My question is in regard to the spdep and GeoDa packages. Do you know how to extract a neighborhood/adjacency matrix from R? I need a matrix that has all the neighborhoods on the X and Y axis, and then a r=1 when the neighborhoods touch, and a r=0 when neighborhoods don't touch. I think the Mora

Re: [R] as.character ()

2008-03-31 Thread jim holtman
Is this what you want: > x=c(2.00,1.20,5.00,6.56) > sprintf("%.2f", x) [1] "2.00" "1.20" "5.00" "6.56" On Mon, Mar 31, 2008 at 4:45 PM, benlafleche <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to tranform a numeric vector into a character vector. > > > x=c(2.00,1.20,5.00,6.56) > > y= as.

[R] as.character ()

2008-03-31 Thread benlafleche
Hello, I'm trying to tranform a numeric vector into a character vector. > x=c(2.00,1.20,5.00,6.56) > y= as.character(x) > y [1] "2""1.2" "5""6.56" What I want is : [1] "2.00""1.20" "5.00""6.56" Does someone know how to do this please ? Benoit Bruneau __

Re: [R] Dendrogram orientation

2008-03-31 Thread Henric Nilsson (Public)
Lassana TOURE wrote: > I am using the two functions hclust and plot to draw a dendrogram. The > result is a vertical dendrogram , but I prefer a horizontal one. > > Need help. Take a look at `?dendrogram'. HTH, Henric > > This is my script: > > > > dd1=hclust(d1, method="ward") > > pl

Re: [R] tkconfigure throws an error

2008-03-31 Thread Greg Snow
The command argument in the tkconfigure call should be a function, you have the results of sourcing the file, probably not the correct thing. Try something like: tkconfigure(b1,command=function(...){source("./src/f.imm2.R")}) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data

[R] investing in ideas and decision support system experimentation

2008-03-31 Thread davosjhitch
we're looking for help to analyze some theoretical data-sets, essentially outlining the progress of a given number of ideas over time, by using R in conjunction with mysql databases. let's say there is a game, and the point of the game is to find the most worthwhile solution. let's extend that an

[R] tkconfigure throws an error

2008-03-31 Thread stephen bond
Thanks everybody for looking at this. I am trying to assign a script to a button please help: library(tcltk) tt<- tktoplevel() tktitle(tt)<-"the title" heading<-tklabel(tt,text="Enter date as -MM-DD") l1<-tklabel(tt,text="Reporting date") b1=tkbutton(tt,text="Run") d.val<-tkentry

[R] Can not load msm package

2008-03-31 Thread John Sorkin
windows XP R 2.6.0 I have tried to install the msm package several times. Each time the installation appears to work. I then go to PACKAGES->LOAD PACKAGE but the msm package does not appear in the SELECT ONE dialog box. Can someone suggest how I can get msm to run on my system? Thanks, John

[R] 3d line smoothing

2008-03-31 Thread Gregory Jefferis
Dear R People, I would like to smooth some 3d lines, which consist of line segments specified by start and end 3d coordinates. These are experimentally derived from microscope images of neurons, so there is no sense in which one axis is any different from any other (predictor vs response). I hav

Re: [R] ps or pdf

2008-03-31 Thread Francois Pepin
Prof Brian Ripley wrote: > Please see the footer of this message. Sorry, here is an example. For some reason, I cannot reproduce it without using actual gene names. set.seed(1) ##The row names were originally obtained using the hgug4112a library ##from bioconductor. I set it manually for peop

Re: [R] adding device size-independent y=0 line to a lattice plot

2008-03-31 Thread Levi Waldron
On Mon, Mar 31, 2008 at 4:04 PM, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > > The obvious thing to try would be > > dotplot(y~x|fac, > panel = function(...) { > panel.abline(h = 0) > panel.dotplot(...) > }) > > Does this not work? > > -Deepayan > Yes t

Re: [R] adding device size-independent y=0 line to a lattice plot

2008-03-31 Thread Deepayan Sarkar
On 3/31/08, Levi Waldron <[EMAIL PROTECTED]> wrote: > Using the following lattice plot as an example, I would like to add > horizontal lines where y=0: > > library(lattice) > library(grid) > fac <- gl(4,12) > x <- letters[rep(1:3,16)] > y <- runif(48,min=0.0) > dotplot(y~x|fac) > > I've tri

[R] adding device size-independent y=0 line to a lattice plot

2008-03-31 Thread Levi Waldron
Using the following lattice plot as an example, I would like to add horizontal lines where y=0: library(lattice) library(grid) fac <- gl(4,12) x <- letters[rep(1:3,16)] y <- runif(48,min=0.0) dotplot(y~x|fac) I've tried it with grid.lines using npc and native units, which works fine unless I chan

Re: [R] ps or pdf

2008-03-31 Thread Prof Brian Ripley
On Mon, 31 Mar 2008, Francois Pepin wrote: > Hi everyone, > > I have been making a fair amount of figures in R recently that I've > been touching up with Illustrator and I've found a difference between > pdf and ps files and I was wondering if someone could enlighten me > about them. > > While the

Re: [R] L-BFGS-B needs finite values of 'fn'

2008-03-31 Thread Paul Smith
On Mon, Mar 31, 2008 at 2:57 PM, Zaihra T <[EMAIL PROTECTED]> wrote: > try something like this before wrapping up your function else i guess u'll > have to stick to Prof Brian Ripley suggestion his suggestions are usually > best bet . > > f <- function(x) { > > n <- length(x) > > r <- sum((b^(0

Re: [R] DE optimization with equality constraint

2008-03-31 Thread Paul Smith
On Mon, Mar 31, 2008 at 5:14 PM, Hans W. Borchers <[EMAIL PROTECTED]> wrote: > > The problem with DEoptim approach is that is not guaranteed that it > > converges to the solution. Moreover, from my experience, it seems to > > be quite slow when the optimization problem is high-dimensional (i.e.,

[R] ps or pdf

2008-03-31 Thread Francois Pepin
Hi everyone, I have been making a fair amount of figures in R recently that I've been touching up with Illustrator and I've found a difference between pdf and ps files and I was wondering if someone could enlighten me about them. While the figures look the same, the ps version tends to have trunc

[R] SiZer plots in R

2008-03-31 Thread stephanie watkins
Hello, I am a graduate student at UNC Chapel Hill, and I am attempting to create a SiZer plot for a nonparametric analysis. I have found the file to use this program in Matlab, however I was hoping to find a package to use this in R. Does anyone know of a package that can create this type of gr

Re: [R] mean vs sum behavior

2008-03-31 Thread Gavin Simpson
On Mon, 2008-03-31 at 18:41 +0200, Emmanuel Castella wrote: > Dear all > Could someone explain me why > lapply(split(x,fac),mean) > returns means per levels of fac for each column of x > whereas > lapply(split(x,fac),sum) > does not return sums per level of fac and columns of x, but adds all > col

[R] mean vs sum behavior

2008-03-31 Thread Emmanuel Castella
Dear all Could someone explain me why lapply(split(x,fac),mean) returns means per levels of fac for each column of x whereas lapply(split(x,fac),sum) does not return sums per level of fac and columns of x, but adds all columns together? Hence, how can I get sum to behave as mean in this instance?

Re: [R] operators %/% bug?

2008-03-31 Thread Spencer Graves
Consider also the following: a <- 1.2 b <- 1.0 > (a-b)%%.1 [1] 0.1 > (a-b)%/%.1 [1] 1 > .2%%.1 [1] 0 > .2%/%.1 [1] 2 This performs as described on "?%/%". In particular, the second paragraph under "Value": '%%' indicates 'x mod y' and '%/%' indicates integer division. It is

Re: [R] Memory in R.

2008-03-31 Thread jim holtman
On 3/31/08, R RR <[EMAIL PROTECTED]> wrote: > Hi, > > I am pretty new in R. > In fact, I started using R last month. > So, be indulgent if my questions seem > too boring or obvious. > > I have 2 basic questions: > > 1 - I want to increase memory, but I can't find > the right way. E.g: in stata, you

Re: [R] DE optimization with equality constraint

2008-03-31 Thread Hans W. Borchers
Paul Smith gmail.com> writes: > The problem with DEoptim approach is that is not guaranteed that it > converges to the solution. Moreover, from my experience, it seems to > be quite slow when the optimization problem is high-dimensional (i.e., > with many variables). > > Paul There is a differen

Re: [R] operators %/% bug?

2008-03-31 Thread jim holtman
FAQ 7.31 a-b != 0.2 > a <- 1.2 > > b <- 1.0 > > a-b-.2 [1] -5.551115e-17 > On 3/31/08, Lo, Ken <[EMAIL PROTECTED]> wrote: > Dear all, > > > > I have come across a strange behavior of the %/% operator, and I wasn't > sure if this was intended. > > > > i.e. > > a <- 1.2 > > b <- 1.0 > > (a-b) %

[R] operators %/% bug?

2008-03-31 Thread Lo, Ken
Dear all, I have come across a strange behavior of the %/% operator, and I wasn't sure if this was intended. i.e. a <- 1.2 b <- 1.0 (a-b) %/% 0.1 results in 1? Whereas 0.2 %/% 0.1 results in 2. Am I missing something obvious here? It seems to be consistent up to R 2.6.0 running

Re: [R] Journal for R

2008-03-31 Thread John Vokey
Yes. Try: Tutorials in Quantitative Methods for Psychology (I am on the Editorial Board). On 31-Mar-08, at 4:00 AM, [EMAIL PROTECTED] wrote: > Hi the list > > I made up a new statistical procedure. I will publish it in a medical > journal, but there will be only the way

Re: [R] how to extract terms from aov

2008-03-31 Thread talepanda
you can access it as a data frame by > av3<-av2[[1]] then, > dimnames(av3)[[1]] gives you the leftmost labels, and also, > av3$Df > av3$Sum etc, gives the values. > str(object) always help you to find out the structure of object and how to access the information. HTH > I couldn'

[R] how to extract terms from aov

2008-03-31 Thread Weidong Gu
I couldn't find clues from the achieve of R help that allow to retrieve the terms of aov. av2<- summary(aov(Prevalence~Random*Bednet*Flight)); av2 Df Sum Sq Mean Sq F value Pr(>F) Targeted2 2.11e+10 1.05e+10 102.90 < 2e-16 *** Bednet

Re: [R] concatenating two successive time series

2008-03-31 Thread Gabor Grothendieck
It might just be a matter of scaling: ts12s <- ts(c(scale(ts1), scale(ts2)), start = 1982, frequency = 12) plot(ts12s) plot(decompose(ts12s)) 2008/3/31 Jędrzej Bojanowski <[EMAIL PROTECTED]>: > Dear Helpers, > > I am looking for methods and tools to compare and then to concatenate > two successi

[R] "Cannot find new threads: generic error" when require(RODBC) with -d gdb

2008-03-31 Thread Matthew Dowle
Hi, We have the error below. Any ideas ? Regards, Matt $ R --vanilla -d gdb GNU gdb 6.7.1-debian Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribut

[R] concatenating two successive time series

2008-03-31 Thread Jędrzej Bojanowski
Dear Helpers, I am looking for methods and tools to compare and then to concatenate two successive time series. They are both in the same frequency and they describe one phenomena. There is no time gap between them. The problem is that the method of measurements has changed between both time se

[R] Memory in R.

2008-03-31 Thread R RR
Hi, I am pretty new in R. In fact, I started using R last month. So, be indulgent if my questions seem too boring or obvious. I have 2 basic questions: 1 - I want to increase memory, but I can't find the right way. E.g: in stata, you just type "set memory 1g". When I try to load huge datasets, R

Re: [R] Defining reference category for a cph model summary inside of a "for" loop

2008-03-31 Thread Frank E Harrell Jr
Wells, Brian wrote: > Frank, > > Thanks again, I didn't realize that continuous variables could be > manipulated that way inside of the summary function. > > I realize that my code was kind of confusing. > > The variables "A"..."F" are all categorical variables. They each have > four levels n

Re: [R] Retrieving locations of element of a vector or matrix

2008-03-31 Thread Henrique Dallazuanna
For the position use order indeed of sort On 31/03/2008, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote: > I think that you can use: > > x <- sample(1:20, 10) > head(sort(x), 5) #First 5 minimum values > head(sort(x, decreasing = TRUE), 5) #First 5 maximum values > > > On 31/03/2008, Yemi Oyey

Re: [R] Retrieving locations of element of a vector or matrix

2008-03-31 Thread Henrique Dallazuanna
I think that you can use: x <- sample(1:20, 10) head(sort(x), 5) #First 5 minimum values head(sort(x, decreasing = TRUE), 5) #First 5 maximum values On 31/03/2008, Yemi Oyeyemi <[EMAIL PROTECTED]> wrote: > Hello all, > I have a problem of getting the locations of elements in a vector or > matr

Re: [R] convert delimited string to vector

2008-03-31 Thread Henrique Dallazuanna
Or: scan(textConnection("a, b, c"), what="character", sep=",") On 31/03/2008, Brad Christoffersen <[EMAIL PROTECTED]> wrote: > Hi R Users, > > Simple question: How might I convert the text "a, b, c" (or for that matter > "a > b c" with any delimiter - space, comma, etc.) into a 3-element char

Re: [R] Defining reference category for a cph model summary inside of a "for" loop

2008-03-31 Thread Wells, Brian
Frank, Thanks again, I didn't realize that continuous variables could be manipulated that way inside of the summary function. I realize that my code was kind of confusing. The variables "A"..."F" are all categorical variables. They each have four levels named "1st Quartile""4th Quartile"

Re: [R] convert delimited string to vector

2008-03-31 Thread Chuck Cleland
On 3/31/2008 9:43 AM, Brad Christoffersen wrote: > Hi R Users, > > Simple question: How might I convert the text "a, b, c" (or for that matter > "a > b c" with any delimiter - space, comma, etc.) into a 3-element character > vector? > > [1] a b c > > Thanks, > Brad unlist(strsplit("a b c", sp

Re: [R] L-BFGS-B needs finite values of 'fn'

2008-03-31 Thread Zaihra T
try something like this before wrapping up your function else i guess u'll have to stick to Prof Brian Ripley suggestion his suggestions are usually best bet . f <- function(x) { n <- length(x) r <- sum((b^(0:(n-1)))*log(x)) - 200*(sum(x)-k)^2 if(!is.finite(r)) r

[R] Retrieving locations of element of a vector or matrix

2008-03-31 Thread Yemi Oyeyemi
Hello all, I have a problem of getting the locations of elements in a vector or matrix. I know one can use the command "which.min" or which.max" to get the location of minimum or maximum values in a vector. But is there any command to get the first k minimum values or maximum values in a vecto

Re: [R] Number of variables in lrm (Design)

2008-03-31 Thread Frank E Harrell Jr
Paul Sweeting wrote: > Hi > > > > I'm sure this is straightforward, but I can't find an answer. > > > > I'm trying to find the function that returns the number of dependent > variables/rank of the regression/degrees of freedom/something similar. Any > ideas? > > > > Thanks! > > > >

[R] convert delimited string to vector

2008-03-31 Thread Brad Christoffersen
Hi R Users, Simple question: How might I convert the text "a, b, c" (or for that matter "a b c" with any delimiter - space, comma, etc.) into a 3-element character vector? [1] a b c Thanks, Brad __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] unexpected GAM result - at least for me!

2008-03-31 Thread Duncan Murdoch
On 3/31/2008 9:01 AM, Monica Pisica wrote: > Thanks Duncan. > > Yes i do have variation in the lidar metrics (be, ch, crr, and home) > although i have a quite high correlation between ch and home. But even > if i eliminate one metric (either ch or home) i end up with a deviation > of 99.99.

Re: [R] lmer function.

2008-03-31 Thread Douglas Bates
On Mon, Mar 31, 2008 at 7:13 AM, Boikanyo Makubate <[EMAIL PROTECTED]> wrote: > I am using the lmer function from the lme4 package. I wrote the > following statement, specifying the method to be adaptive Gaussian > quadrature. I am getting an error saying "method = "AGQ" not yet > implemented f

Re: [R] Comparing Time Series

2008-03-31 Thread Ingmar Visser
Nathanael, On 31 Mar 2008, at 14:37, nathan3073 wrote: > > It is a reaction time experiment. My program will display 25 circles, > arranged in a 5x5 square. The program will light one circle at a > time, which > the subject should click ASAP. The time interval between two > lighting is > 1.5s

Re: [R] Comparing Time Series

2008-03-31 Thread Gabor Grothendieck
You could look at the dtw package. If x and y are two time series, dtw(x, y)$distance returns the distance between them in the sense discussed in the package. On Mon, Mar 31, 2008 at 8:37 AM, nathan3073 <[EMAIL PROTECTED]> wrote: > > It is a reaction time experiment. My program will display 25 ci

Re: [R] Reorder the x-axis using lattice

2008-03-31 Thread Richard . Cotton
>Is there a way to reorder the xaxis using lattice. Using the > following data, the x-axis is ordered as BP GH MH PF RE RP SF VT but > I would like the x-axis to be ordered as PF RP BP GH VT SF RE MH. > > Kön Skalor Tillfälle Medelvärde > 1 Kvinnor BP 1-inskrivning 36.4

Re: [R] unexpected GAM result - at least for me!

2008-03-31 Thread Monica Pisica
Thanks Duncan. Yes i do have variation in the lidar metrics (be, ch, crr, and home) although i have a quite high correlation between ch and home. But even if i eliminate one metric (either ch or home) i end up with a deviation of 99.99. The species has values of 0 and 1 since i try to predict

Re: [R] Comparing Time Series

2008-03-31 Thread nathan3073
It is a reaction time experiment. My program will display 25 circles, arranged in a 5x5 square. The program will light one circle at a time, which the subject should click ASAP. The time interval between two lighting is 1.5s. If the subject fails to click in approriate time, the data will be consi

Re: [R] L-BFGS-B needs finite values of 'fn'

2008-03-31 Thread Paul Smith
Thanks for you help and for having called my attention to the trace facilities of optim(), which are really helpful. Paul On Mon, Mar 31, 2008 at 12:43 PM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > Your function gives -Inf at the lower bound on the parameters, so you are > minimizing a fu

Re: [R] unexpected GAM result - at least for me!

2008-03-31 Thread Duncan Murdoch
On 3/31/2008 8:34 AM, Monica Pisica wrote: > > Hi > > > I am afraid i am not understanding something very fundamental and does > not matter how much i am looking into the book "Generalized Additive Models" > of S. Wood i still don't understand my result. > > I am trying to model presenc

Re: [R] Generating maps in R

2008-03-31 Thread Roger Bivand
Aleksandr Andreev duke.edu> writes: > > Roger Bivand Roger.Bivand at nhh.no writes: > > > Merge using: > > FS1 <- spCbind(FS, agg2) > > This call fails, because: > Error in spCbind(FS, agg2) : different numbers of rows This was exactly why I emphasised care. One way to try to do this is to e

[R] unexpected GAM result - at least for me!

2008-03-31 Thread Monica Pisica
Hi I am afraid i am not understanding something very fundamental and does not matter how much i am looking into the book "Generalized Additive Models" of S. Wood i still don't understand my result. I am trying to model presence / absence (presence = 1, absence = 0) of a species using

Re: [R] plot 3dimensional points with "log" axes

2008-03-31 Thread Duncan Murdoch
On 3/31/2008 7:05 AM, Hung-Hsuan Chen (Sean) wrote: > Dear R users > I am looking for functions that can plot 3 dimensional > figures *with logarithmic axes*. > > I tried scatterplot3d (under package scatterplot3d) but > the log parameter is not implemented (although "log" > appears in the paramet

[R] ggplots - how to increase the number of levels

2008-03-31 Thread Ptit_Bleu
Hi, Thanks to Hadley Wickham, I am now able to plot some nice "weather" graphs (see http://www.nabble.com/how-to-plot-image%28%29-without-painting-a-map-%28the-background%29-td15546906.html#a15584405 How to plot a graph on a map ). For some parameters, I would like to increase the number of leve

[R] lmer function.

2008-03-31 Thread Boikanyo Makubate
I am using the lmer function from the lme4 package. I wrote the following statement, specifying the method to be adaptive Gaussian quadrature. I am getting an error saying "method = "AGQ" not yet implemented for supernodal representation". Please help. > fit <- lmer(response~beta1+(1|patien

Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second & subsequent calls to function fails. Please help debug.)

2008-03-31 Thread Martin Oliver Sailer
Dear all, thanks for the advice. The latest version of crossdes (1.0-8) on CRAN now has namespaces. Hope this helps. Regards Oliver Sailer Duncan Murdoch schrieb: > On 30/03/2008 8:43 AM, Michael Kubovy wrote: >> Thanks, Duncan, >> >> I started a new session under the suspicion that packages

Re: [R] L-BFGS-B needs finite values of 'fn'

2008-03-31 Thread Prof Brian Ripley
Your function gives -Inf at the lower bound on the parameters, so you are minimizing a function without a lower bound. Using the trace facilities of optim() would have got you thereeasily enough. On Mon, 31 Mar 2008, Paul Smith wrote: > Dear All, > > I am trying to solve the optimization prob

[R] L-BFGS-B needs finite values of 'fn'

2008-03-31 Thread Paul Smith
Dear All, I am trying to solve the optimization problem below, but I am always getting the following error: Error in optim(rep(20, nvar), f, gr, method = "L-BFGS-B", lower = rep(0, : L-BFGS-B needs finite values of 'fn' Any ideas? Thanks in advance, Paul ---

[R] plot 3dimensional points with "log" axes

2008-03-31 Thread Hung-Hsuan Chen (Sean)
Dear R users I am looking for functions that can plot 3 dimensional figures *with logarithmic axes*. I tried scatterplot3d (under package scatterplot3d) but the log parameter is not implemented (although "log" appears in the parameter list). Does anyone has some suggestions? Thanks a lot Austin

[R] aov and errors used for interaction effects

2008-03-31 Thread O.Langner
Dear list-members, I just switched to R, so here probably a newbie question, I couldn't find a answer for yet: Assume a design with three repeated measures factors (F1-F3), I tried to run the following: aov(rt ~ F1*F2*F3 + Error(subject / (F1*F2*F3))) Comparing the output from here and SPSS (Ge

Re: [R] Reverse seq

2008-03-31 Thread Chuck Cleland
On 3/31/2008 6:31 AM, Mario Maiworm wrote: > Hi all, > I thought I was not SUCH a nooby:) > How can I reverse a sequence/ vector? > i.e., turn > X <- 3 5 4 2 6 5 4 3 6 > Into > X <- 6 3 4 5 6 2 4 5 3 > I mean without looping and indexing. > There should be a very easy solution, shouldn't it? >

[R] Reverse seq

2008-03-31 Thread Mario Maiworm
Hi all, I thought I was not SUCH a nooby:) How can I reverse a sequence/ vector? i.e., turn X <- 3 5 4 2 6 5 4 3 6 Into X <- 6 3 4 5 6 2 4 5 3 I mean without looping and indexing. There should be a very easy solution, shouldn't it? Mario ___

[R] Reorder the x-axis using lattice

2008-03-31 Thread Tom Cohen
Dear list, Is there a way to reorder the xaxis using lattice. Using the following data, the x-axis is ordered as BP GH MH PF RE RP SF VT but I would like the x-axis to be ordered as PF RP BP GH VT SF RE MH. Kön Skalor Tillfälle Medelvärde 1 Kvinnor BP 1-inskrivning

Re: [R] 3d plot

2008-03-31 Thread Uwe Ligges
If you want to plot some surface, use persp(); or wireframe() from package lattice; or persp3d() from package "rgl" or therelike. Uwe Ligges kate wrote: > Hi, > I would like to have 3d plot, and I found that there is a command > "scatterplot3d". x is V, y=sigmaV, and z=TSE (note: After some cal

Re: [R] png file in batch mode

2008-03-31 Thread Uwe Ligges
mysimbaa wrote: > Dear R users, > I have an R script which produce me a plot. I run it in batch mode. > The outputed file is .ps > How ca I ouput the plot in .png in stead of .ps ? > I found in R FAQ 7.19 the solution but it is for Linux, and I'm using > Windows. What about using the png() devi

[R] png file in batch mode

2008-03-31 Thread mysimbaa
Dear R users, I have an R script which produce me a plot. I run it in batch mode. The outputed file is .ps How ca I ouput the plot in .png in stead of .ps ? I found in R FAQ 7.19 the solution but it is for Linux, and I'm using Windows. Thanks for your help, Ciao, Adel -- View this message in co

Re: [R] hsv2rgb in R

2008-03-31 Thread Richard . Cotton
> I noted that there is a hsv2rgb in the C-API, but no corresponding function in > R, while rgb2hsv is available in R. > > Does the functionality of hsv2rgb hide under some other name? I agree that it does seem like such a function ought to exist. You can use col2rgb(hsv(...)) to get what you

Re: [R] R-packages installation problems

2008-03-31 Thread Prof Brian Ripley
How did you install R? If from the F8 RPMs, it looks like you missed the R-devel RPM (which was always recommended to install packages, and has become necessary in the F8 RPM for 2.6.2). Note that Fedora are responsible for making clear what you need to install from their re-packaged distribu

[R] Odp: I need really help

2008-03-31 Thread Petr PIKAL
Hi 1. Install R 2. Read some intro documents (doc folder) 3. Try to reproduce simple examples from let say R-intro.pdf and/or R-data.pdf 4. Try to follow examples with your data 5. When there is an error read a message and try to get some explanation in help page associa

Re: [R] hsv2rgb in R

2008-03-31 Thread Martin Maechler
> "DM" == Dieter Menne <[EMAIL PROTECTED]> > on Mon, 31 Mar 2008 08:06:39 + (UTC) writes: DM> I noted that there is a hsv2rgb in the C-API, but no DM> corresponding function in R, while rgb2hsv is available DM> in R. DM> Does the functionality of hsv2rgb hide under

[R] R-packages installation problems

2008-03-31 Thread Roberto Cremonini
Dear, I've installed the following R version on HP compaq 6710 b under Fedora 8: > version _ platform i386-redhat-linux-gnu arch i386 os linux-gnu system i386, linux-gnu status major 2 minor 6.2 year 2008 month 02 day 08 svn rev 44383 language R version.string R version 2.6.2 (2008-02-08) When

[R] hsv2rgb in R

2008-03-31 Thread Dieter Menne
I noted that there is a hsv2rgb in the C-API, but no corresponding function in R, while rgb2hsv is available in R. Does the functionality of hsv2rgb hide under some other name? Dieter __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

Re: [R] WinXP exhibits sluggish graphics window movement & mouse tracking (repainting?) over windows graphics devices

2008-03-31 Thread Prof Brian Ripley
I don't see this on a much older and slower machine, so suspect a problem with your Windows. It looks like something is set up to ask R to repaint after the mouse pointer, whereas Windows ought to be doing that. Even then, R uses double buffering, so the repaint should be fast (provided graph

Re: [R] ggplot2 argument handling odd

2008-03-31 Thread Sebastian Weber
Hi Hadley, I tried today your solution to this problem. However, the finally working code was like eval(substitute(ggplot( aes_string(...) )) The qplot code below did not work at all, neither works a ggplot(aes_string(...)) BTW: Since I am always writing scripts to produce my plots, how can I

Re: [R] I need really help

2008-03-31 Thread Liviu Andronic
Hello Mohammed, On Sun, Mar 30, 2008 at 11:26 PM, mohammed alawa <[EMAIL PROTECTED]> wrote: > I'm student doing master in statistics, I'd like to know how i can set data > in R and apply meta-analysis. i have tries many ways but I'm really stuck. "PLEASE do read the posting guide http://www.R-

Re: [R] Comparing Time Series

2008-03-31 Thread Prof Brian Ripley
Surely you need the insight before choosing a package? What is the problem you are trying to solve? There are many different aspects of time series which could be of interest, and we have no idea which are relevant to your problem. On Sun, 30 Mar 2008, nathan3073 wrote: > > Dear All, > I need

Re: [R] S4 : the list of all the object

2008-03-31 Thread Martin Maechler
> "CG" == Christophe Genolini <[EMAIL PROTECTED]> > on Sat, 29 Mar 2008 16:20:41 +0100 writes: CG> Hi the list, Is it possible to get the list of all the CG> S4 user define classes? do you mean those in .GlobalEnv? If you have written a package using S4 classes, these are als

[R] Number of variables in lrm (Design)

2008-03-31 Thread Paul Sweeting
Hi I'm sure this is straightforward, but I can't find an answer. I'm trying to find the function that returns the number of dependent variables/rank of the regression/degrees of freedom/something similar. Any ideas? Thanks! Paul [[alternative HTML version deleted]] _

[R] MANOVA, SCC and multiple comparisons

2008-03-31 Thread Frédéric Chiroleu
Bonjour, we wanted to fit a manova as descripted in Marieta /et al./ 2003, "convergent habitat segregation of /Aedes aegyptii/ and /Aedes albopictus/ (Diptera: /Culicidae/) in Southern Brazil and Florida", /J. Med. Entomol./, *40* (6), 785-794. They did their analysis with SAS software. We hav

[R] Comparing Time Series

2008-03-31 Thread nathan3073
Dear All, I need to compare hundreds (about 200-300) of time series. Would anyone tell me how to do this in R? If R has no package for doing this, can I get some insight what method I should use? best regards, Nathanael Gratias -- View this message in context: http://www.nabble.com/Comparing-Ti