[R] fractional ranks

2008-06-05 Thread array chip
Hi, is there a function to calculate fractional ranks? Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

[R] Getting R and x11 to work

2008-06-05 Thread Rick Bilonick
I'm using Suse Linux Enterprise Desktop 10.2 (SP2) on an HP 2133 (x86) mini-notebook. (There apparently are a LOT of bugs in 10.1!) I downloaded R-base from the openSuse 10.2 repository and was (finally) able to install it (after installing blas and gcc-fortran). I can start an R session and do com

Re: [R] R loop

2008-06-05 Thread Gabor Grothendieck
Note that "%Y-%m-%d" is the default format so you can omit it. Perhaps you want something along these lines (modify formula to get the precise numbering you like): a$wk <- julian(a$date, as.Date("2008-01-01")) %/% 7 Also note %W can be used as a format string. See ?strptime for the codes. R Ne

Re: [R] Problem in executing R on server

2008-06-05 Thread Ray Brownrigg
On Fri, 06 Jun 2008, Jason Lee wrote: > Hi > > > Rolf: SessionInfo() on my server gives me :- > > R version 2.7.0 (2008-04-22) > x86_64-redhat-linux-gnu > > locale: > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF- >8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.

Re: [R] R loop

2008-06-05 Thread Moshe Olshansky
Hi Andy, I see two problems: First of all, it must be a$wk[i] <- 1 and not a$wk <- 1, since this way it makes all 10 entries of a$wk to be 1. But R won't complain about this! What R should complain about is your loop. If you write for (i in a$date) it means that i loops between all the VALUES

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
Hi Rolf: SessionInfo() on my server gives me :- R version 2.7.0 (2008-04-22) x86_64-redhat-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREME

Re: [R] Problem in executing R on server

2008-06-05 Thread Ray Brownrigg
What does the limit (or "ulimit -a" in sh or bash) command (outside of R) respond with? In Solaris, there can be per-user limits to memory use. HTH, Ray Brownrigg On Fri, 06 Jun 2008, Jason Lee wrote: > Hi R-listers, > > I have problem in executing my R on server. It returns me > > Error: canno

Re: [R] Existence of formal arguments.

2008-06-05 Thread Bert Gunter
Folks: Don't forget about R's lazy evaluation mechanism. In your example below, a and b are as yet unevaluated promises. As such, they have various properties, which you can investigate via something like: foo <- function(a,b){browser()} In your example, get("a") is an empty promise. For amuseme

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
Hi, I am not too sure its what you meant :- Below is the closest data for each session from "top" PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 26792 jason 25 0 283m 199m 2620 R 100 0.6 0:00.38 R The numbers changed as the processes are running. I am actually sharing t

Re: [R] problems with reading the data and merge

2008-06-05 Thread Daniel Folkinshteyn
the '00' entries may be in a numeric column, so it gets typecast to a number, and of course 00 == 0, numerically speaking, so they get 'condensed'. to be sure you read everything "as is", specify "colClasses='character'. : data<-read.table("data.txt",sep='\t', header=T, colClasses='character')

Re: [R] R loop

2008-06-05 Thread Steven McKinney
But note that you could do this in a vectorized fashion and not use a loop at all: > a$wk <- (as.numeric((a$date - set)) %/% 7) + 1 > a x y date wk 1 2660156 6476767 2008-01-01 1 2 2660156 6476767 2008-01-01 1 3 2663703 6475013 2008-01-01 1 4 2663703 6475013 2008-01-01

Re: [R] write.table() error

2008-06-05 Thread Daniel Folkinshteyn
looks like you don't have permission to write a file to C:\ try writing to some other directory where you have write access (e.g., your user's home dir, or your "my documents", or something like that). on 06/05/2008 11:57 PM Megh Dal said the following: Hi, I got following error in write.tab

Re: [R] write.table() error

2008-06-05 Thread Charilaos Skiadas
I just managed to write things just fine, and then I recalled that I had a similar problem when teaching our students SPSS (Yes, I know, don't ask...), but the problem was effectively this: If a given file was open in Excel, then that file was locked and no other program could use it until

Re: [R] R loop

2008-06-05 Thread Steven McKinney
The bolding is lost in plain-text email, but some things to note: :: for(i in a$date){ - this will make i take on date values, you probably meant i to index the rows of a[] :: you missed indexing in your replacements in the then and else clauses :: you probably want some equalities in your

Re: [R] Existence of formal arguments.

2008-06-05 Thread Charilaos Skiadas
On Jun 5, 2008, at 9:13 PM, Duncan Murdoch wrote: On 05/06/2008 8:23 PM, Rolf Turner wrote: I just discovered what seems to me to be a slight funny in respect of formal argument names. If I define a function foo <- function(a,b){ ... whatever ...} then ``inside'' foo() the exists() fu

[R] problems with reading the data and merge

2008-06-05 Thread kayj
I have a problem with reading a file data.txt that has a header Each row has the individual ID and then some data that are letter and numbers such as 00 If I read the file as data<-read.table("data.txt",sep='\t', header=T) write.table(data,file="data1.txt", sep='\t', quote=F, col.names=T,

Re: [R] Y values below the X plot

2008-06-05 Thread jpardila
Thank you Peter :0. This is exactly what I was looking for!!! Peter Alspach wrote: > > JP > > Try using text() instead of legend(). > > HTH > > Peter Alspach > > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of jpardila >> Sent: Fr

[R] error message from Tps function

2008-06-05 Thread Tania Pena
Hello list-mailers, I'm trying to use the 'Tps' function from the 'fields' package and I can getting this error message: > fishplot <- Tps(nodes.catch, res2) Error in if ((il > 1) & (il < nstep.cv)) { : missing value where TRUE/FALSE needed In addition: Warning message: no non-missing argu

[R] write.table() error

2008-06-05 Thread Megh Dal
Hi, I got following error in write.table() : > write.table(dataa, file="c:/data1.csv", row.names=F, col.names=T, sep=",") Error in file(file, ifelse(append, "a", "w")) : cannot open the connection In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file 'c:/d

[R] R loop

2008-06-05 Thread Andrew McFadden
I all I am just trying to get the idea of a loop if statement for another purpose. I was going to label a new variable based on date ie first week 1, second week 2 etc. My code in bold is wrong but seems logical to me, could someone help. x <- rep(c(2660156,2663703,2658165,2659303,2661531,2660914

Re: [R] Problem in executing R on server

2008-06-05 Thread Rolf Turner
On 6/06/2008, at 2:24 PM, Jason Lee wrote: Hi Rolf and all, I tried on --vanilla flag but its still the same error. I moved the existing RData to other names. And when I re run R and encounter the same problem, I exit the R and try to find the RData file but there is no RData. Please ad

Re: [R] Problem in executing R on server

2008-06-05 Thread Erik Iverson
And what is your sessionInfo() in each case! Jason Lee wrote: Hi, I query free -m, On my server it is, total used free sharedbuffers cached Mem: 32190 8758 23431 0742 2156 And on my pc, total u

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
Hi, I query free -m, On my server it is, total used free sharedbuffers cached Mem: 32190 8758 23431 0742 2156 And on my pc, total used free sharedbuffers cached Mem: 100

Re: [R] Problem in executing R on server

2008-06-05 Thread Erik Iverson
How much RAM is installed in your Sun Solaris server? How much RAM is installed on your PC? Jason Lee wrote: Hi, I am actually trying to do some matrix multiplications of large datasets of 3000 columns and 150 rows. And I am running R version 2.7.0. I tried setting R --mi

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
Hi Rolf and all, I tried on --vanilla flag but its still the same error. I moved the existing RData to other names. And when I re run R and encounter the same problem, I exit the R and try to find the RData file but there is no RData. Please advise. On Fri, Jun 6, 2008 at 11:58 AM, Rolf Turner

Re: [R] Problem in executing R on server

2008-06-05 Thread Rolf Turner
On 6/06/2008, at 1:36 PM, Jason Lee wrote: Hi R-listers, I have problem in executing my R on server. It returns me Error: cannot allocate vector of size 15.8 Mb each time when i execute R on the server. But it doesnt give me any problem when i try executing on my own Pc (except it runs ex

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
Hi, I am actually trying to do some matrix multiplications of large datasets of 3000 columns and 150 rows. And I am running R version 2.7.0. I tried setting R --min-vsize=10M --max-vsize=100M --min-nsize=500k --max-nsize=1000M Yet I still get:- Error: cannot allocate vector of size 17.7 Mb I

Re: [R] Existence of formal arguments.

2008-06-05 Thread Rolf Turner
On 6/06/2008, at 12:57 PM, Erik Iverson wrote: Note the difference between test <- function(a) { exists("a", mode = "symbol") } test() and test2 <- function(a) { exists("a", mode = "numeric") #say } test2() and then note that the default mode argument to exists is "any". Basically, I

Re: [R] Problem in executing R on server

2008-06-05 Thread Erik Iverson
Jason Lee wrote: Hi R-listers, I have problem in executing my R on server. It returns me Error: cannot allocate vector of size 15.8 Mb each time when i execute R on the server. But it doesnt give me any problem when i try executing on my own Pc (except it runs extremely slow). Any pointers

Re: [R] estimate phase shift between two signals

2008-06-05 Thread David Stoffer
help(spec.pgram) - then look at the examples at the bottom of the page Dylan Beaudette-3 wrote: > > Hi, > > Are there any functions in R that could be used to estimate the > phase-shift > between two semi-sinusoidal vectors? Here is what I have tried so far, > using > the spectrum() functio

Re: [R] Why doesn't formatC( x, digits=2, format="g") doesn't always give 2 sig figs?

2008-06-05 Thread Duncan Murdoch
On 05/06/2008 8:48 PM, Peter Dunn wrote: Hi all I am not a C programmer, but I am trying to understand formatC to get consistent printing of reals to a given number of significant digits. Can someone please explain this to me? These first three give what I expect on reading ?formatC:

[R] Problem in executing R on server

2008-06-05 Thread Jason Lee
Hi R-listers, I have problem in executing my R on server. It returns me Error: cannot allocate vector of size 15.8 Mb each time when i execute R on the server. But it doesnt give me any problem when i try executing on my own Pc (except it runs extremely slow). Any pointers to this? I tried to r

Re: [R] Existence of formal arguments.

2008-06-05 Thread Duncan Murdoch
On 05/06/2008 8:23 PM, Rolf Turner wrote: I just discovered what seems to me to be a slight funny in respect of formal argument names. If I define a function foo <- function(a,b){ ... whatever ...} then ``inside'' foo() the exists() function will return TRUE from ``exists("a") whether

Re: [R] Why doesn't formatC( x, digits=2, format="g") doesn't al

2008-06-05 Thread Ted Harding
On 06-Jun-08 00:48:50, Peter Dunn wrote: > Hi all > I am not a C programmer, but I am trying to understand formatC to > get consistent printing of reals to a given number of significant > digits. > Can someone please explain this to me? These first three give what > I expect on reading ?forma

Re: [R] Existence of formal arguments.

2008-06-05 Thread Erik Iverson
Note the difference between test <- function(a) { exists("a", mode = "symbol") } test() and test2 <- function(a) { exists("a", mode = "numeric") #say } test2() and then note that the default mode argument to exists is "any". Rolf Turner wrote: I just discovered what seems to me to be a

[R] Why doesn't formatC( x, digits=2, format="g") doesn't always give 2 sig figs?

2008-06-05 Thread Peter Dunn
Hi all I am not a C programmer, but I am trying to understand formatC to get consistent printing of reals to a given number of significant digits. Can someone please explain this to me? These first three give what I expect on reading ?formatC: > formatC(0.005, digits=2,format="fg",fla

Re: [R] Existence of formal arguments.

2008-06-05 Thread Duncan Murdoch
On 05/06/2008 8:23 PM, Rolf Turner wrote: I just discovered what seems to me to be a slight funny in respect of formal argument names. If I define a function foo <- function(a,b){ ... whatever ...} then ``inside'' foo() the exists() function will return TRUE from ``exists("a") whether

[R] Existence of formal arguments.

2008-06-05 Thread Rolf Turner
I just discovered what seems to me to be a slight funny in respect of formal argument names. If I define a function foo <- function(a,b){ ... whatever ...} then ``inside'' foo() the exists() function will return TRUE from ``exists("a") whether an object named ``a'' exists or not. But g

Re: [R] linear model in the repeated data type~

2008-06-05 Thread Austin, Matt
Apologies, the second method should have been allCoefs <- vector("list", length(allFits)) for(i in 1:length(allFits)) allCoefs[[i]] <- coef(allFits[[i]]) --Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Austin, Matt Sent: Thursday, June 05, 2008

Re: [R] linear model in the repeated data type~

2008-06-05 Thread Austin, Matt
allFits <- lmList(y ~ t|id, data=table1, pool=FALSE) allCoefs <- sapply(allFits, coef) ## preferred by me or allCoefs <- list(length(allFits)) for(i in 1:length(allFits)) allCoef[[i]] <- coef(allFits[[i]]) --Matt From: Manli Yan [mailto:[EMAIL PROTECTED] Sent

[R] (baseline) logistic regression + gof functions?

2008-06-05 Thread Wim Bertels
 Hallo, which function can i use to do (baseline) logistic regression + goodness of fit tests? so far i found: # logistic on binary data lrm combined with resid(model,'gof') # logistic on binary dat

Re: [R] [Possible SPAM] Reading selected lines in an .html file

2008-06-05 Thread Martin Morgan
Staying in R, the XML package in conjunction with the XPATH query language is likely to be your friend. > library(XML) > html=htmlTreeParse("http://www.wunderground.com/global/stations/16239.html";, > useInternal=TRUE) > xpathApply(html, "//[EMAIL PROTECTED]'tempf' and +@pwsid='LIRA']/@value"

Re: [R] [Possible SPAM] Reading selected lines in an .html file

2008-06-05 Thread Daniel Folkinshteyn
i know this is an R mailing list :) but... i'll recommend you try python with the beautifulsoup module - makes html processing a cinch. another thing to note is that wunderground provides very handy RSS feeds for every location, so rather than parsing the html page (with it's associated bundle

Re: [R] Improving data processing efficiency

2008-06-05 Thread Daniel Folkinshteyn
Thanks, I'll take a look at Rprof... but I think what i'm missing is facility with R idiom to get around the looping, and no amount of profiling will help me with that :) also, full working code is provided in my original post (see toward the bottom). on 06/05/2008 03:43 PM bartjoosen said t

Re: [R] Matrix of data frames

2008-06-05 Thread Gabor Grothendieck
On Thu, Jun 5, 2008 at 4:22 PM, <[EMAIL PROTECTED]> wrote: > Dear R-Users, > > Is there a way to create a matrix of data frames in R ? Using builtin BOD and women: > m <- matrix(list(BOD, women, women, BOD), 2) > m[[1,2]] # women height weight 1 58115 2 59117 3 601

Re: [R] [Possible SPAM] Reading selected lines in an .html file

2008-06-05 Thread Nutter, Benjamin
I've tried to tackle a similar question at the request of a coworker. Unfortunately, it is difficult to read in HTML code because it lacks character that can consistently be used as a delimiter. The only guideline I can offer is that any text you're interested in is going to be between a ">" and a

Re: [R] Y values below the X plot

2008-06-05 Thread Peter Alspach
JP Try using text() instead of legend(). HTH Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of jpardila > Sent: Friday, 6 June 2008 1:51 a.m. > To: r-help@r-project.org > Subject: [R] Y values below the X plot > > > Dear List

Re: [R] how to get the distribution curve from a data set?

2008-06-05 Thread Daniel Folkinshteyn
would a density plot do? try plot(density(x)) if you are specifically after the histogram tops rather than a density estimate, then get the hist object with plot=F, then look at the counts attribute: histobj = hist(x, freq="TRUE", breaks=1000, plot=F) plot(histobj$counts) hope this helps. o

Re: [R] how to get the distribution curve from a data set?

2008-06-05 Thread Henrique Dallazuanna
See ?density On Thu, Jun 5, 2008 at 4:56 PM, rlearner309 <[EMAIL PROTECTED]> wrote: > > I have a question. > I have a data set (about 100,000 observations). How would I get the > distribution curve graph? This is like, if I use hist(x, freq="TRUE", > breaks=1000) to get the histogram, now the

[R] Matrix of data frames

2008-06-05 Thread tolga . i . uzuner
Dear R-Users, Is there a way to create a matrix of data frames in R ? I am pulling in data frames from a SQL database into R using RODBC. I would like to pull in a sequence of data frames which are indexed across two dimensions, and store each data frame as an element in a matrix. I did try th

[R] Which lib/func should I use to get S-estimates of multivariate scatter?

2008-06-05 Thread rlearner309
I have a multivariate data set, and I would like to get the S-estimates of the scatter (robust estimates of variance-covariance matrix). Which library/function should I use? Thank you very much! -- View this message in context: http://www.nabble.com/Which-lib-func-should-I-use-to-get-S-estima

[R] two questions about regression models and clustering routines

2008-06-05 Thread Maura E Monville
I managed to use an example (see attachment) of clever regression routines. I customized it to suit my needs. The initial model I try to fit consists of the first 10 powers of time (time the observation was recorded) and the first 10 powers of the phase. In fact my files record patients' breathing

[R] how to get the distribution curve from a data set?

2008-06-05 Thread rlearner309
I have a question. I have a data set (about 100,000 observations). How would I get the distribution curve graph? This is like, if I use hist(x, freq="TRUE", breaks=1000) to get the histogram, now the question is, I don't need the histogram itself, I just need the curve that connects the top of

Re: [R] negative indexing with null index sets

2008-06-05 Thread Gabor Grothendieck
Here are a few possibilities. The first three use seq_along and the last two use if and length: x[ !seq_along(x) %in% a[s] ] x[ !match(seq_along(x), a[s], 0) ] x[ setdiff(seq_along(x), a[s]) ] if (length(a[s])) x[-a[s]] else x x[ if (length(a[s])) -a[s] else TRUE ] On Thu, Jun 5, 2008 at 3:

Re: [R] power of a multiway ANOVA

2008-06-05 Thread Rolf Turner
On 6/06/2008, at 1:08 AM, biologeeks wrote: dear all, in the package pwr , there is the fonction power.anova.test which permit to obtain the power for a one-way ANOVA...but I'm looking for a way to compute the power of a multiway ANOVA.( find the 1-beta). Is it possible? do you have some

Re: [R] Improving data processing efficiency

2008-06-05 Thread bartjoosen
Maybe you should provide a minimal, working code with data, so that we all can give it a try. In the mean time: take a look at the Rprof function to see where your code can be improved. Good luck Bart Daniel Folkinshteyn-2 wrote: > > Hi everyone! > > I have a question about data processing e

Re: [R] ggplot questions

2008-06-05 Thread Thompson, David (MNR)
Thanx Hadley, More questions inline. >-Original Message- >From: hadley wickham [mailto:[EMAIL PROTECTED] >Sent: June 5, 2008 01:09 PM >To: Thompson, David (MNR) >Cc: r-help@r-project.org >Subject: Re: [R] ggplot questions > >On Wed, Jun 4, 2008 at 2:03 PM, Thompson, David (MNR) ><[EMAIL

[R] negative indexing with null index sets

2008-06-05 Thread roger koenker
Negative indexing is often handy, but I'm in need of an appropriate idiom for handling cases in which the index set can be null: x <- rnorm(5) a <- 1:5 s <- rep(FALSE,5) y <- x[-a[s]] # I'd like y == x but instead one has x[-a[s]] == x[a[s]] == numeric(0), which is rather # unfortunate -

Re: [R] Limit distribution of continuous-time Markov process

2008-06-05 Thread Charles C. Berry
On Thu, 5 Jun 2008, [EMAIL PROTECTED] wrote: I have (below) an attempt at an R script to find the limit distribution of a continuous-time Markov process, using the formulae outlined at http://www.uwm.edu/~ziyu/ctc.pdf, page 5. First, is there a better exposition of a practical algorithm for do

[R] Improving data processing efficiency

2008-06-05 Thread Daniel Folkinshteyn
Hi everyone! I have a question about data processing efficiency. My data are as follows: I have a data set on quarterly institutional ownership of equities; some of them have had recent IPOs, some have not (I have a binary flag set). The total dataset size is 700k+ rows. My goal is this: For

Re: [R] power of a multiway ANOVA

2008-06-05 Thread Charles C. Berry
See, http://tolstoy.newcastle.edu.au/R/help/06/05/27989.html HTH, Chuck On Thu, 5 Jun 2008, biologeeks wrote: dear all, in the package pwr , there is the fonction power.anova.test which permit to obtain the power for a one-way ANOVA...but I'm looking for a way to compute the power

Re: [R] Graphing help revisited

2008-06-05 Thread Greg Snow
Does this do what you want? Bill <- data.frame(A= c(1,1,1,2,3,4,5,6,6,7), B=c(5,5,6,7,7,7,8,9,10,11), group=rep(1:2, each=5) ) with(Bill, plot(A,B, pch=group) ) mns <- with(Bill, tapply(B, group, mean)) tmp <- par('usr') # or range(Bill$A) med <- with(Bill, mean( c(max(A[group==

Re: [R] Delete NA from a dist object

2008-06-05 Thread Gabor Grothendieck
Try this: d <- dist(USArrests) ix <- which("Iowa" == labels(d)) d1 <- as.dist(as.matrix(d)[-ix, -ix]) On Thu, Jun 5, 2008 at 9:39 AM, Birgitle <[EMAIL PROTECTED]> wrote: > > I have a dist object containing 1 row that is only NA (not very intelligent > to have bas dataset with one NA speciesa

Re: [R] Degree Symbol

2008-06-05 Thread Gabor Grothendieck
Try: RSiteSearch("plotmath degree character") On Thu, Jun 5, 2008 at 1:18 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > I have looked at math plot and still can not figure out how to get a degree > symbol into the y label. I would like degrees C > thanks > > Stephen > > -- > Let's not spend o

[R] Graphing help revisited

2008-06-05 Thread William Pepe
Sorry, my last post came out unreadable. I'll try again. Here is the data. Think of them as transposed columns. A: 1,1,1,2,3,4,5,6,6, 7B: 5,5,6,7,7,7,8,9,10,11 Split the data into two groups, each of size 5, and make a scatterplot. Bill<-read.table('something here') attach(Bill)Bill.s<-split

[R] Degree Symbol

2008-06-05 Thread stephen sefick
I have looked at math plot and still can not figure out how to get a degree symbol into the y label. I would like degrees C thanks Stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel

Re: [R] ggplot questions

2008-06-05 Thread hadley wickham
On Wed, Jun 4, 2008 at 2:03 PM, Thompson, David (MNR) <[EMAIL PROTECTED]> wrote: > Hello, > > A few questions about the following examples: > 1. Why do the two plotting versions not produce the same result? Because version one has two layers, and version two has one? > 2. Is the 'scale_x_continuo

Re: [R] label outliers in geom_boxplot (ggplot2)

2008-06-05 Thread hadley wickham
2008/5/27 Mihalicza Péter <[EMAIL PROTECTED]>: > Dear List and Hadley, > > I would like to have a boxplot with ggplot2 and have the outlier values > labelled with their "name" attribute. So I did > > library(ggplot2) > > dat=data.frame(num=rep(1,20), val=c(runif(18),3,3.5), > name=letters[1:2

Re: [R] Need to run R on Fedora 9.

2008-06-05 Thread Jonathan Baron
On 06/05/08 09:28, RobertsLRRI wrote: > > I'm in need of a version of R that will run on fedora 9 and haven't been able > to find one. I need this in order to run Bioconductor. Any advice? Why not say (as root) yum install R ? Worked for me. The point is that there is now a Fedora rpm for R.

Re: [R] Java to R interface

2008-06-05 Thread Bio7
The native *.dll can't be found for any reason. For a first start simply put the native lib in your Eclipse Java project. If you are developing a plugin or a RCP application a must read is this article: http://www.eclipsezone.com/articles/eclipse-vms/ explaining how to load and place native libs

[R] Need to run R on Fedora 9.

2008-06-05 Thread RobertsLRRI
I'm in need of a version of R that will run on fedora 9 and haven't been able to find one. I need this in order to run Bioconductor. Any advice? -- View this message in context: http://www.nabble.com/Need-to-run-R-on-Fedora-9.-tp17674187p17674187.html Sent from the R help mailing list archive

Re: [R] Securities earning covariance

2008-06-05 Thread Patrick Burns
I would start by creating a matrix that held the returns with rows being the dates and columns being the securities. You can do this by something along the lines of: days <- as.character(df[, 'DAY']) sec <- as.character(df[, 'SEC_ID'] earningmat <- array(NA, c(length(unique(days)), length(uniq

Re: [R] Securities earning covariance

2008-06-05 Thread Gabor Grothendieck
Replace cov(z) with cov(z, use = "pair") is there are missing values as there are here. On Thu, Jun 5, 2008 at 11:54 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Check out the three vignettes (i.e. pdf documents in the zoo package). e.g. > > > Lines <- "SEC_ID DAY EARNI

Re: [R] Securities earning covariance

2008-06-05 Thread Gabor Grothendieck
Check out the three vignettes (i.e. pdf documents in the zoo package). e.g. Lines <- "SEC_ID DAY EARNING IT001 200701015.467 IT001 200701025.456 IT001 200701034.954 IT001 200701043.456 IT002 200

[R] Securities earning covariance

2008-06-05 Thread ANGELO.LINARDI
Good morning, I am a new R user and I am trying to learn how to use it. I am trying to solve this problem. I have a dataframe df of daily securities (for a year) earnings as follows: SEC_ID DAY EARNING IT001 200701015.467 IT001 200701025.45

Re: [R] Fourier Transform

2008-06-05 Thread Foadi, J (James)
-Original Message- From: [EMAIL PROTECTED] on behalf of Neil Gupta Sent: Thu 6/5/2008 15:21 To: R-help@r-project.org Subject: [R] Fourier Transform Hello All, I wanted to perform a fourier transform on high frequency financial data. I have searched and have not found much on this topic f

Re: [R] Lattice + Word: Changing .wmf files to .pdf files

2008-06-05 Thread Gabor Grothendieck
I also use R PDF graphic files; however, note that they can be imported directly into Word, at least on my version of Word which is Word 2007 on Windows Vista SP1, using Insert | Object (_not_ Insert | Picture) eliminating the intermediate step. On Thu, Jun 5, 2008 at 9:56 AM, Soukup, Mat <[EMAIL

Re: [R] Creating a list of functions

2008-06-05 Thread Duncan Murdoch
On 6/5/2008 10:50 AM, Andreas Posch wrote: I've been trying to create a list of function where function[[i]] should actually return the value of i. trying: func <- vector("list",2) i <- 1 while (i <= 2) { func[[i]] <- function() { i } i <- i+1 } however only returned the last value of i for e

[R] Java to R interface

2008-06-05 Thread madhura
I am developing an application that uses Eclipse framework on Windows. I have to call R from Java. I downloaded rJava package and installed it. I set the classpath in the Run Dialog in Eclipse to the directory where the JRI.jar is. I set the Path environmental variable to the directory where R.d

Re: [R] How to combine to PCAs

2008-06-05 Thread bady
hi, hi all, There are several methods to analyse two (e.g. coinertia, procuste) or K tables (e.g. statis, mfa, gpa, etc.) in the packages ade4, FactoMiner, etc. Otherwise analyses on instrumental variables can be an interesting way to explore your dataset (e.g. within/between analyses, etc.) hope

[R] Help

2008-06-05 Thread amjadali ktk
Hi, Does anybody know how to install the Arfima 1.01. from OX? They have mentioned it in fARMA package in R but im not succeeded to install it yet. please help me if some one knows about it.   Thanks [[alternative HTML version deleted]] __

[R] Graphing help

2008-06-05 Thread William Pepe
Hoping someone can help me with some graphics. Here is my data set. A B 1 5 1 5 1 6 2 7 3 7 4 7 5 8 6 9 6 10 7 11 Using this code, I split the data into two groups, each of size 5, and made a scatterplot. Bill<-read.table('something here

Re: [R] Creating a list of functions

2008-06-05 Thread jim holtman
Is this what you want: > func <- vector("list",2) > i <- 1 > while (i <= 2) + { + func[[i]] <- local({ + z <- i + function(){ z } + }) + i <- i+1 + } > func[[1]]() [1] 1 > func[[2]]() [1] 2 > Your solution was using 'i' which picked up the last definition of 'i'. 'local

Re: [R] Fourier Transform

2008-06-05 Thread stephen sefick
If you want power spectral density then spec.pgram() and a wrapper to this spectrum should do the trick (MASS which is a part of R base I think) add the argument log="no" if you don't want to see the power on a log scale also remember that the smoothed periodogram is a consitent estimator of the sp

[R] Creating a list of functions

2008-06-05 Thread Andreas Posch
I've been trying to create a list of function where function[[i]] should actually return the value of i. trying: func <- vector("list",2) i <- 1 while (i <= 2) { func[[i]] <- function() { i } i <- i+1 } however only returned the last value of i for each function. Any help how to achieve the so

Re: [R] Delete NA from a dist object

2008-06-05 Thread Birgitle
Have still some problems match("name", names(object)) [1] NA which(names(object)=="Iname") integer(0) TestDist = object[-"name",] Fehler in -"name" : ungültiges Argument für unären Operator Error in -"name": invalid argument for unären (don`t know what this means) operator Thanks Birgit m

[R] Fourier Transform

2008-06-05 Thread Neil Gupta
Hello All, I wanted to perform a fourier transform on high frequency financial data. I have searched and have not found much on this topic for R. I was wondering if anyone has used any libraries for it or have come across any papers I may read. Many Thanks, Neil Gupta [[alternative HTML

[R] spherical plots?

2008-06-05 Thread Dieter Vanderelst
Dear List, I'm wondering whether it is possible to use R to make spherical plots. I have 3d data: azimuth, elevation and a certain variable Y. I want to plot Y in terms of azimuth and elevation such that it seems to be a contour plot overlaid on a sphere (but projected on a plane, of course)

Re: [R] vector comparison

2008-06-05 Thread Bert Gunter
.. or identical(sort(unique(a)),sort(unique(b))) -- Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jim holtman Sent: Thursday, June 05, 2008 5:01 AM To: Karin Lagesen Cc: r-help@r-project.org Subject: Re: [R

Re: [R] Delete NA from a dist object

2008-06-05 Thread mel
Birgitle a écrit : Many thanks. Is there a way to give me the number of the row, if I have the row name? B. a= object 'w' = name > match('w', names(a)) # or > which(names(a)=='w') # or but deletion should work with the number and/or with the name. _

Re: [R] Delete NA from a dist object

2008-06-05 Thread Birgitle
Additonally I got this error message TestDist = Dist.HalbDisGow88[-147,] Fehler in Dist.HalbDisGow88[-147, ] : falsche Anzahl von Dimensionen (Error in Dist.HalbDisGow88[-147, ] : wrong number of dimensions Birgit mel-10 wrote: > > Birgitle a écrit : > >> I have a dist object containing 1

Re: [R] GAM hurdle models

2008-06-05 Thread Achim Zeileis
On Thu, 5 Jun 2008, John Poulsen wrote: Hello, I have been using mgcv to run GAM hurdle models, analyzing presence/absence data with GAM logistic regressions, and then analyzing the data conditional on presence (e.g. without samples with no zeros) with GAMs with a negative binomial distribut

Re: [R] Delete NA from a dist object

2008-06-05 Thread Birgitle
Many thanks. Is there a way to give me the number of the row, if I have the row name? B. mel-10 wrote: > > Birgitle a écrit : > >> I have a dist object containing 1 row that is only NA (not very >> intelligent >> to have bas dataset with one NA speciesanyway). >> I would like to delete t

[R] Y values below the X plot

2008-06-05 Thread jpardila
Dear List, I am creating a plot and I want to insert the tabular data below the X axis. I mean for every value of X I want to show the value in Y as a table below the plot. I think the attached image gives an idea of what I mean by this. Below is the code i am using now... but as you see the Y v

Re: [R] Space character introduced bu paste

2008-06-05 Thread Karl Ove Hufthammer
Karl Ove Hufthammer: > Use 'sep=""'. And using 'sapply' instead of 'lapply' gives a nicer input. > The following works. > > $ sapply(charlist, function(y) paste("'",y,"'", sep="")) > a     b     c > "'a'" "'b'" "'c'" But a simpler solution is to use sQuote(). Note that by default this may use di

Re: [R] Lattice + Word: Changing .wmf files to .pdf files

2008-06-05 Thread Soukup, Mat
Hi All, I'm by no means an expert on anything related to M$ products... However I was recently forced (reluctantly at that) to put together a PPT presentation which included multiple R graphics. So I thought I'd share what I found to produce decent looking graphics. I created all the graphics fro

Re: [R] Random Forests regression by strata

2008-06-05 Thread Liaw, Andy
That's currently not supported (because no one up to now had wanted to do it). Andy > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Monday, June 02, 2008 4:21 PM > To: r-help@r-project.org > Subject: [R] Random Forests

Re: [R] Delete NA from a dist object

2008-06-05 Thread mel
Birgitle a écrit : I have a dist object containing 1 row that is only NA (not very intelligent to have bas dataset with one NA speciesanyway). I would like to delete this row from this object. newDistObject = distObject[-unwantedRow, ] hih __ R

[R] Limit distribution of continuous-time Markov process

2008-06-05 Thread gschultz
I have (below) an attempt at an R script to find the limit distribution of a continuous-time Markov process, using the formulae outlined at http://www.uwm.edu/~ziyu/ctc.pdf, page 5. First, is there a better exposition of a practical algorithm for doing this? I have not found an R package that

Re: [R] Space character introduced bu paste

2008-06-05 Thread Karl Ove Hufthammer
[EMAIL PROTECTED]: >> charlist<-c("a","b","c") >> lapply(charlist, function (y) paste("'",y,"'")) Use 'sep=""'. And using 'sapply' instead of 'lapply' gives a nicer input. The following works. $ sapply(charlist, function(y) paste("'",y,"'", sep="")) a b c "'a'" "'b'" "'c'" -- Karl

  1   2   >