Re: [R] Help with curr directory in R

2011-11-02 Thread Khanvilkar, Shashank
Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Khanvilkar, Shashank Sent: Wednesday, November 02, 2011 2:15 PM To: R Mailing List Subject: [R] Help with curr directory in R Hello All Thanks for all responses in advance, I am invoking R from

[R] Help with curr directory in R

2011-11-02 Thread Khanvilkar, Shashank
Hello All Thanks for all responses in advance, I am invoking R from command line from C:\TEMP as C:\Program Files\R\R-2.9.1\bin\R.exe --vanilla -f C:\temp\test.R On two different machines The test.R looks like: --SNIP- print(c("CurrDir=", getwd())) proc.time() warnings() --SNIP- On one machin

[R] Reading two-cloumn CSV file into a hash table

2011-09-26 Thread Khanvilkar, Shashank
Sending it again, with correct subject line. Hello All, Thanks in advance for all help, I am trying to read a two column csv file in R, which looks like: X,1 Y,2 Z,3 I am using R commands: tmp = read.csv("test.csv", colClasses=c("character", "character")) How can make this into a hash table,

[R] Reading two-cloumn CSV file into a hash table

2011-09-26 Thread Khanvilkar, Shashank
Hello All, Thanks in advance for all help, I am trying to read a two column csv file in R, which looks like: X,1 Y,2 Z,3 I am using R commands: tmp = read.csv("test.csv", colClasses=c("character", "character")) How can make this into a hash table, so that I can access, tmp["X"] and it will ret

[R] Add elements to a global list

2011-09-06 Thread Khanvilkar, Shashank
Hello All, Thanks in advance for all help. In my prog, I have a global list object that is used as a container for storing some data frames. Here is an example code. --SNIP-- temp1 <- function(X){ statName = c("Mean", "stdDev", "NumSamples") statVal = c("0.5", "0.51", "5") r = data

Re: [R] Histograms with strings,

2011-03-17 Thread Khanvilkar, Shashank
Thanks > which.max(table(x)) 129.46.71.19 10 How do I get only "129.46.71.19" back as a str... -Original Message- From: jim holtman [mailto:jholt...@gmail.com] Sent: Thursday, March 17, 2011 4:39 PM To: Khanvilkar, Shashank Cc: r-help Subject: Re: [R] Histograms

[R] Histograms with strings,

2011-03-17 Thread Khanvilkar, Shashank
Hello, Thanks in advance for any help, I have read a CSV file in which there is a column for an IP addr as in: tmpInFile$V2 [1] "74.125.224.38" "74.125.224.38" "129.46.71.19" "129.46.71.19" [5] "129.46.71.19" "129.46.71.19" "129.46.71.19" "129.46.71.19" [9] "129.46.71.19" "129.46.71.19

Re: [R] Question on sapply

2011-02-09 Thread Khanvilkar, Shashank
Thanks, Nopes.. Does not seem to work. > lapply(z, as.numeric) [[1]] [1] 1 1 [[2]] [1] 2 2 [[3]] [1] 3 3 [[4]] [1] 4 4 > typeof(z[[1]][1]) [1] "character" Shank From: Henrique Dallazuanna [mailto:www...@gmail.com] Sent: Wednesday, February 09, 2011 12:34 PM To: Khanvilkar, Sha

Re: [R] Question on sapply

2011-02-09 Thread Khanvilkar, Shashank
Sorry.. my bad.. I should have done z = lapply(z, as.numeric) That works. Shank From: Khanvilkar, Shashank Sent: Wednesday, February 09, 2011 1:33 PM Cc: r-help@r-project.org Subject: RE: [R] Question on sapply Thanks, Nopes.. Does not seem to work. > lapply(z, as.numeric) [[1]] [1] 1 1

[R] Question on sapply

2011-02-09 Thread Khanvilkar, Shashank
Hello All, Thanks in advance for all help I have the following vector of strings that I want to split.. > y = c("1/1","2/2", "3/3", "4/4") > y [1] "1/1" "2/2" "3/3" "4/4" > z = strsplit(y,"/") > z [[1]] [1] "1" "1" [[2]] [1] "2" "2" [[3]] [1] "3" "3" [[4]] [1] "4" "4" Now how do I convert all