[R] Looping through a series of (csv) files

2007-07-15 Thread Yuchen Luo
Dear Colleagues. This should be a very common operation and I believe there should be a nice way in R to handle it. I couldn't find it in the manual or by searching online. I am wondering if I could ask for some help in this community. I have 48 csv files; each stores the data for a specific

Re: [R] Send SMS out of R?

2007-07-15 Thread Hans-Peter
Now I want to send an SMS out of R! Any idea how it could work? Could I send an eMail to a mobile phone number? There are Email to SMS services you can use. Google gives plenty of them (also free ones (which I wouldn't use myself...)). -- Regards, Hans-Peter

Re: [R] Send SMS out of R?

2007-07-15 Thread hadley wickham
On 7/14/07, Thomas Schwander [EMAIL PROTECTED] wrote: Hi everyone, Now I read the posting guidelines again; COMPLETELY! ;-) I use Windows XP Professional, R 2.5.1 and I have Blat to send eMails out of R. Works perfect! Thank you for your help! Now I want to send an SMS out of R! Any

[R] Mailing List

2007-07-15 Thread Alfred Inselberg
Please add me to your mailing list. Thank you Alfred Inselberg -- Alfred Inselberg, Professor School of Mathematical Sciences Tel Aviv University Tel Aviv 61390, Israel Tel +972-3-640 5372 http://www.math.tau.ac.il/~aiisreal/ __

Re: [R] Looping through a series of (csv) files

2007-07-15 Thread Chuck Cleland
Yuchen Luo wrote: Dear Colleagues. This should be a very common operation and I believe there should be a nice way in R to handle it. I couldn't find it in the manual or by searching online. I am wondering if I could ask for some help in this community. I have 48 csv files; each stores

Re: [R] unixtime conversion

2007-07-15 Thread Patrick Drechsler
Prof Brian Ripley [EMAIL PROTECTED] writes: On Sat, 14 Jul 2007, Patrick Drechsler wrote: is there an R function to convert unixtime to one of the R time formats (using chron or POSIXct)? Example data: unixtime year month day hour 1183377301 2007 7 2

[R] Please Please Help me!!!

2007-07-15 Thread TIMMMAY
I posted the message below a few days ago but I have not had any responses. I keep thinking that there must be some easy way to answer the problem I am just not familiar enough with regression to answer the problem myself. If anyone can help me I would be very grateful. I need to fit a gamma

[R] Complex surveys, properly computed SEs and non-parametric analyses

2007-07-15 Thread John Sorkin
Can someone direct me to an R function that properly computes standard errors of data obtained from a complex survery design, i.e. perform alnalyses similiar to those that can be performed with SUDAAN, particularly for a non-parametric one-way ANOVA, e.g. signed rank test? Thanks, John John

[R] Area selection agorithms

2007-07-15 Thread Des Callaghan
Hi, Various algorithms have been developed for selecting efficient sets of areas for biodiversity conservation, given a list of the areas and the different species they contain (e.g. the algorithms used within the WorldMap software that is distributed by the Natural History Museum in London).

Re: [R] Complex surveys, properly computed SEs and non-parametric analyses

2007-07-15 Thread Tobias Verbeke
Dear John, Can someone direct me to an R function that properly computes standard errors of data obtained from a complex survery design i.e. perform alnalyses similiar to those that can be performed with SUDAAN, articularly for a non-parametric one-way ANOVA, e.g. signed rank test? The

Re: [R] Please Please Help me!!!

2007-07-15 Thread Gabor Grothendieck
The reason no one answered may be that you did not follow the last line to every r-help message or read and follow the posting guide. Its time consuming to develop a test environment and data needed to clarify and test the answer to a question. By providing data and reproducible code you reduce

[R] Pairlist of pairlsit assembly howto

2007-07-15 Thread Johannes Graumann
Hy guys, I'm trying something like this minbins - list() for (minute in sequence(3)) { minbins[minute] - list(data=a,variable=b) } And it doesn't work ... Warning messages: 1: number of items to replace is not a multiple of replacement length in: minbins[minute] - list(data = a,

[R] Break during the recursion?

2007-07-15 Thread Atte Tenkanen
Hi, Is it possible to break using if-condition during the recursive function? Here is a function which almost works. It is for inorder-tree-walk. iotw-function(v,i,Stack,Indexes) # input: a vector and the first index (1), Stack=c(), Indexes=c(). { print(Indexes) # if

Re: [R] Pairlist of pairlsit assembly howto

2007-07-15 Thread Duncan Murdoch
(This isn't important to your question, but those aren't pairlists. Pairlists are rarely used in R code, except implicitly in the way R stores parsed code.) On 15/07/2007 10:00 AM, Johannes Graumann wrote: Hy guys, I'm trying something like this minbins - list() for (minute in

Re: [R] Break during the recursion?

2007-07-15 Thread Atte Tenkanen
Oh. I forgot one extra-function: pop.stack-function(v){ if(length(v)==0){x=NA} if(length(v)==1){x=v[1]; v=c()} if(length(v)1){x=v[1]; v=v[2:length(v)]} return(list(vector=v,x=x)) } Atte Hi, Is it possible to break using if-condition during the recursive

Re: [R] Break during the recursion?

2007-07-15 Thread Duncan Murdoch
On 15/07/2007 10:06 AM, Atte Tenkanen wrote: Hi, Is it possible to break using if-condition during the recursive function? You can do if (condition) return(value) Here is a function which almost works. It is for inorder-tree-walk. iotw-function(v,i,Stack,Indexes) # input: a vector

Re: [R] Break during the recursion?

2007-07-15 Thread Atte Tenkanen
On 15/07/2007 10:06 AM, Atte Tenkanen wrote: Hi, Is it possible to break using if-condition during the recursive function? You can do if (condition) return(value) Here is a function which almost works. It is for inorder-tree- walk. iotw-function(v,i,Stack,Indexes) #

Re: [R] Break during the recursion?

2007-07-15 Thread Duncan Murdoch
On 15/07/2007 10:33 AM, Atte Tenkanen wrote: On 15/07/2007 10:06 AM, Atte Tenkanen wrote: Hi, Is it possible to break using if-condition during the recursive function? You can do if (condition) return(value) Here is a function which almost works. It is for inorder-tree- walk.

Re: [R] Break during the recursion?

2007-07-15 Thread Atte Tenkanen
On 15/07/2007 10:33 AM, Atte Tenkanen wrote: On 15/07/2007 10:06 AM, Atte Tenkanen wrote: Hi, Is it possible to break using if-condition during the recursive function? You can do if (condition) return(value) Here is a function which almost works. It is for inorder-tree-

Re: [R] Break during the recursion?

2007-07-15 Thread Duncan Murdoch
On 15/07/2007 11:36 AM, Atte Tenkanen wrote: On 15/07/2007 10:33 AM, Atte Tenkanen wrote: On 15/07/2007 10:06 AM, Atte Tenkanen wrote: Hi, Is it possible to break using if-condition during the recursive function? You can do if (condition) return(value) Here is a function which almost

[R] Text with differents colors in a plot / Detecting if text exists

2007-07-15 Thread Maja Schröter
Hi everybody, I want to write some text in a plot. That's simple I know. But I want to make use of different colors. Eg. text(x,y,paste(Sunderland,high)). Then Sunderland should be black and high red. Has anyone an idea? By the way. I'm looking for a function or something similar, that can

Re: [R] Break during the recursion?

2007-07-15 Thread hadley wickham
On 7/15/07, Duncan Murdoch [EMAIL PROTECTED] wrote: On 15/07/2007 11:36 AM, Atte Tenkanen wrote: On 15/07/2007 10:33 AM, Atte Tenkanen wrote: On 15/07/2007 10:06 AM, Atte Tenkanen wrote: Hi, Is it possible to break using if-condition during the recursive function? You can do if

Re: [R] Complex surveys, properly computed SEs and non-parametric analyses

2007-07-15 Thread Thomas Lumley
On Sun, 15 Jul 2007, Tobias Verbeke wrote: The survey package of Thomas Lumley has very broad functionality for the analysis of data from complex sampling designs. Please find below the homepage of the package (which is available on CRAN): http://faculty.washington.edu/tlumley/survey/ I

Re: [R] Choosing the number of colour breaks in ggplot2

2007-07-15 Thread Karl Ove Hufthammer
Fredag 13. juli 2007 skreiv hadley wickham: There's no official way to do it, but you can hack the colour gradient scale to do what you want: # Create a modified scale gr - scale_fill_gradient2()$clone() gr$breaks - function(.) seq(-100, 100, by=10) Thank you so much. It works perfectly.

[R] How to sort a data.frame

2007-07-15 Thread Andrew Prendergast
I noticed a decent guide on how to sort data.frames is somewhat lacking. To fill the gap I have written a quick post on the subject, which is here: http://www.andrewprendergast.com/2007/07/sorting_a_dataframe_in_r.html Regards, ap. __

[R] How to load a dataset

2007-07-15 Thread Felipe Carrillo
Hi: Since I didn't get any answers, I'll refresh my question. I have a dataset called Chinook Run saved in Excel and I want it to be loaded everytime R starts, so I can call it with a statement like the one below: qplot(color, Year/Forklength, data = Chinook Run) I wonder how can I do

Re: [R] Break during the recursion?

2007-07-15 Thread Atte Tenkanen
Here is now more elegant function for inorder tree walk, but I still can't save the indexes!? This version now prints them ok, but if I use return, I get only the first v[i]. leftchild-function(i){return(2*i)} rightchild-function(i){return(2*i+1)} iotw-function(v,i) { if

Re: [R] Break during the recursion?

2007-07-15 Thread hadley wickham
On 7/15/07, Atte Tenkanen [EMAIL PROTECTED] wrote: Here is now more elegant function for inorder tree walk, but I still can't save the indexes!? This version now prints them ok, but if I use return, I get only the first v[i]. leftchild-function(i){return(2*i)}

Re: [R] Break during the recursion?

2007-07-15 Thread Atte Tenkanen
TNX Hadley! Atte - Original Message - From: hadley wickham [EMAIL PROTECTED] Date: Sunday, July 15, 2007 11:04 pm Subject: Re: [R] Break during the recursion? On 7/15/07, Atte Tenkanen [EMAIL PROTECTED] wrote: Here is now more elegant function for inorder tree walk, but I still

Re: [R] HELP FOR BUGS

2007-07-15 Thread Mike Meredith
You might find the 'arm' package useful. For a good introduction to heirarchical modeling, using 'arm' and also WinBUGS and R2WinBUGS, read Gelman, A; J Hill 2007. Data analysis using regression and multilevel/hierarchical models. Cambridge University Press. Cheers, Mike. Ali raza-4 wrote:

[R] NNET re-building the model

2007-07-15 Thread dos Reis, Marlon
Hello, I've been working with nnet and now I'd like to use the weigths, from the fitted model, to iterpret some of variables impornatce. I used the following command: mts - nnet(y=Y,x=X,size =4, rang = 0.1, decay = 5e-4, maxit = 5000,linout=TRUE) X is (m x n) Y is (m x 1) And then I

Re: [R] spatstat - Fitting a Strauss model with trend determined by kernel density smoother

2007-07-15 Thread Rolf Turner
On 14/07/2007, at 2:51 AM, Alejandro Veen wrote: Dear r-help, I would like to use the 'ppm' function of the 'spatstat' package to fit a Strauss inhibition model. I understand that I can specify a parametric model for the background trend, but how would I specify a trend which is estimated

Re: [R] Please Please Help me!!!

2007-07-15 Thread TIMMMAY
Followings someones advice on a previous post I am reposting my question again. Here is is and I would appreciate any help with my problem. This question is basically a mathematical question, but I am sure there must be an easy way to achieve the answer to my problem using R as, my problem seems

Re: [R] NNET re-building the model

2007-07-15 Thread Prof Brian Ripley
This is almost unreadable (is your space bar broken?) but you seem to be missing the non-linearity of the hidden units. The definition is in the book nnet (sic) supports, in a layout I cannot reproduce in plain text. On Mon, 16 Jul 2007, dos Reis, Marlon wrote: Hello, I've been working with

[R] Restructuring data

2007-07-15 Thread Daniel Malter
Hi folks, I am new to the list and relatively new to R. I am trying to unstack data arraywise and could not find a convenient solution yet. I tried to find a solution for the problem on help archives. I also tried to use the reshape command in R and the reshape package but could not get result. I

[R] Partial Proportional Odds model using vglm

2007-07-15 Thread Rizwan Younis
Hi: I am trying to fit a PPO model using vglm from VGAM, and get an error while executing the code. Here is the data, code, and error: Data = rc13, first row is the column names. a = age, and 1,2,3, 4 and 5 are condition grades. a 1 2 3 4 5 1 1 0 0 0 0 2 84 2 7 10 2 3 16 0 6 6 2

[R] neural networks function in R

2007-07-15 Thread adschai
Hi all gurus, I have a few general questions about using neural networks function, i.e. the nnet function. I'm new to this function and still exploring it. So please kindly bear with me. Here are my questions. 1. Is there anyway that I can specify my own objective or loss function for my

Re: [R] Restructuring data

2007-07-15 Thread deepayan . sarkar
On 7/15/07, Daniel Malter [EMAIL PROTECTED] wrote: Hi folks, I am new to the list and relatively new to R. I am trying to unstack data arraywise and could not find a convenient solution yet. I tried to find a solution for the problem on help archives. I also tried to use the reshape command

Re: [R] How to sort a data.frame

2007-07-15 Thread Gabor Grothendieck
The example could be simplified like this: T - productSalesByStore T - merge(T, rowsum(T$sales, T$store), by.x = 2, by.y = 0) T[order(T$V1, T$sales, decreasing = TRUE), 1:3] If you transfer your data to a data base then this SQL statement would also do it: select store, product, sales from

[R] Dates in 'persp' plots

2007-07-15 Thread Josh Quigley
Hello, I would like to have the y axis show dates in a 3D 'persp' plot. The following example works... x - spot y - as.numeric(dates)# class(dates) produces output [1] Date z - t(price) persp(x, y, z, ticktype=detailed) ...however the y axes contains

Re: [R] How to sort a data.frame

2007-07-15 Thread Gabor Grothendieck
In thinking about this a bit more an even simpler solution based on ave is: storesales - ave(T$sales, T$store, FUN = sum) T[order(storesales, T$sales, decreasing = TRUE), ] On 7/15/07, Gabor Grothendieck [EMAIL PROTECTED] wrote: The example could be simplified like this: T -

Re: [R] Restructuring data

2007-07-15 Thread hadley wickham
On 7/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On 7/15/07, Daniel Malter [EMAIL PROTECTED] wrote: Hi folks, I am new to the list and relatively new to R. I am trying to unstack data arraywise and could not find a convenient solution yet. I tried to find a solution for the