Re: [R] XML and RCurl: problem with encoding (htmlTreeParse)

2010-07-03 Thread Ryusuke Kenji
ownload and parse the content in one operation: htmlParse("http://home.sina.com";, encoding = "UTF-8") If you want to use getURL() in RCurl, use the .encoding parameter You didn't tell us the output of Sys.getlocale() or how your terminal/console is configured, so

Re: [R] XML and RCurl: problem with encoding (htmlTreeParse)

2010-07-02 Thread Ryusuke Kenji
Hi All, First method:- >library(XML) >theurl <- "http://home.sina.com"; >download.file(theurl, "tmp.html") >txt <- readLines("tmp.html") >txt <- htmlTreeParse(txt, error=function(...){}, useInternalNodes = TRUE) >g <- xpathSApply(txt, "//p", function(x) xmlValue(x)) >head(grep(" ", g, value

[R] sqlFetch maximum rows

2010-03-15 Thread Ryusuke Kenji
Hi, I was trying to import data from MS Access while face some capacity problem. There was only 320 rows sqlFetch into R even though I write max equal to 0: >sqlFetch(channel, tablenames='Sample', max=0) When I try sqlFetchMore there was only shown -1. May I know if there gotta better way t

Re: [R] Creating a new Access database with R

2010-02-14 Thread Ryusuke Kenji
. Haven’t checked it since. You might want to look at simply creating a new file titled ‘justanothername.mdb’ and see if it works (probably not) Sorry I can’t be more helpful, which is why I keep this off the list… Uri From: Ryusuke Kenji

Re: [R] Creating a new Access database with R

2010-02-11 Thread Ryusuke Kenji
I am facing the same problem as well, I would like to code with following concept but wondering how to cope it. if (*mdb file exist) { add new row/col } else { add new *mdb file } -- From:

[R] sqlSave data into multiple *.mdb files

2010-02-10 Thread Ryusuke Kenji
Hi All, con <- member <- class <- list() for(i in 1:5) { con[[i]] <- odbcConnectAccess(paste("C:/Desktop/Data/source",i,".mdb",sep = '')) #read data from Access files member[[i]] <- sqlFetch(con[[i]],'member') #get table data from *.mdb files observe[[i]] <- sqlFetch(con[[i

Re: [R] Time Series Rating Model

2009-12-19 Thread Ryusuke Kenji
Experts, I have try to do seperate and doing simulation on lm.dibp (bivpois). I edited some elements to fit my soccer scores model. The static model has completed, I try to biuld a weight function for dynamic model as refer to dixon & coles(1997). existing weighted function in bivpoi