[R] filling in datasets of differing lengths

2011-01-17 Thread James Smith
ifelse(brep$year[i]==bs$data[i],print("blah"),added<-cbind(as.character(brep $site[i]),as.character(brep$class[i]),0,bs$sequence[i])) added } any advice would be greatly appreciated many thanks James James Smith Wildlife Ecologist, Mornington Sanct

[R] fImport data from Australian stock exchange

2009-05-03 Thread James Smith
Dear all, I have been importing data into R from yahoo using yahooSeries, however the older version I was using no longer works with the syntax I have developed. I downloaded the latest package and it downloads data from the U.S. just fine, but the ticker codes for the Australian stock exchange (a

[R] fImport data from Australian stock exchange

2009-05-02 Thread James Smith
Dear all, I have been importing data into R from yahoo using yahooSeries, however the older version I was using no longer works with the syntax I have developed. I downloaded the latest package and it downloads data from the U.S. just fine, but the ticker codes for the Australian stock exchange (

[R] howto convert matrix of numeric values to Date class?

2008-09-26 Thread Philip James Smith
Hi: I have a matrix, named "mat," of numeric values that are in days since Jan 1, 1960. I want to convert them Date class values so that I can do things like seq( value , len=10, by="1 week") where "value" is any of the matrix elements. How do I do this? Please reply to: [EMAIL PROTECTED]

[R] how can I write code to detect whether the machine is Windows or Linux?

2008-07-23 Thread Philip James Smith
Hi R-People: I use 2 machines: a machine with a Windows XP operating system, and another with a Linux Ubuntu OS. I transport my code between these 2 machines. However, pathnames to data files always need to be "adjusted" to account for the OS that I'm working on. Here is my question: How do

Re: [R] How do I paste double quotes arround a character string?

2008-07-03 Thread Philip James Smith
R Community: At the risk of getting my hands slapped by posting "too much" on the forum, I've described the strategy for reading only certain portions of huge .csv files below. I think that this very well could be of interest to others... I'm sure that I'm not alone in the need to read only

[R] correction to small typo: How do I paste double quotes arround a character string?

2008-07-03 Thread Philip James Smith
Hi all: I made a few typos. Here are the corrections... unix.cmd<-paste( "cut -d, -f" , col.pos , " " , fn , sep = '' )# comma (,) inserted Sorry... Best regards, Phil Philip James Smith wrote: He Ted: My command will look like: g

Re: [R] How do I paste double quotes arround a character string?

2008-07-03 Thread Philip James Smith
ew Mexico so I don't seem to have had the problem you describe below. On the other hand, back in Linux, if I do: [EMAIL PROTECTED]:~$ ls -l \"New Mexico\" ls: "New: No such file or directory ls: Mexico": No such file or directory which looks like the problem you describe --

Re: [R] How do I paste double quotes arround a character string?

2008-07-03 Thread Philip James Smith
executes it. When unix sees that slash before the quotes, it gives an error. I'd be grateful if you can provide a solution to this!! Thank you, Ted! Gratefully, Phil Smith Duluth, GA (Ted Harding) wrote: On 03-Jul-08 01:25:55, Philip James Smith wrote: Hi R Community: I

[R] How do I paste double quotes arround a character string?

2008-07-02 Thread Philip James Smith
Hi R Community: I've got a character string that looks like: New Mexico How to I create the new character string that looks like: "New Mexico" That is, it is the original string (New Mexico) with double quotes infront and behind it? Thanks, Phil Smith __

[R] how do I read only specific columns using read.csv or other read function

2008-07-02 Thread Philip James Smith
Hi R people: I have huge files with as many as 5000 columns. I'd really like to read only certain columns of those files. I know column names I want to read. I looked at the documentation of read.csv . Although there is a col.names option, it allows users to specify the names of the columns,