[R] Analyzing XML data

2009-11-23 Thread skyjo
I would like to analyze XML data from MLB's website. I do the following steps: library(XML) dat<-"http://gd2.mlb.com/components/game/mlb/year_2007/month_05/day_02/gid_2007_05_02_arimlb_lanmlb_1/inning/inning_1.xml"; example<- xmlTreeParse(dat, useInternalNodes=T) ex<-xpathApply(example, "//i

[R] Analyze XML data

2009-11-13 Thread skyjo
I would like to analyze XML data from MLB's website. I do the following steps: library(XML) dat<-"http://gd2.mlb.com/components/game/mlb/year_2007/month_05/day_02/gid_2007_05_02_arimlb_lanmlb_1/inning/inning_1.xml"; example<- xmlTreeParse(dat, useInternalNodes=T) ex<-xpathApply(example, "//inning

Re: [R] Re ading user input (Readline)

2009-10-28 Thread skyjo
Thanks! Rolf Turner-3 wrote: > > > ?get > > On 29/10/2009, at 11:25 AM, skyjo wrote: > >> >> Hello. I am trying to write an interactive function that asks the >> user for a >> vector of observations. Unfortunately, if a user inputs a vector, R

[R] Re ading user input (Readline)

2009-10-28 Thread skyjo
Hello. I am trying to write an interactive function that asks the user for a vector of observations. Unfortunately, if a user inputs a vector, R treats the vector name as a string instead of a variable. Here is an example: vector.input<-function(){ k<-as.integer(readline("Input number of vect