[R] How to source() a .R file which was saved using UTF-8 encoding on Windows?

2011-02-21 Thread Tony Breyal
ut connection 'C:\Users\Tony\Desktop \character_test.R' Any help you can offer in solving and helping me to understand what is going on here would be much appreciated. Best, Tony Breyal ### Session information ### > sessionInfo() # Windows 7 Pro x64 R version 2.12.1 (2010-12-16) Plat

Re: [R] is there a Decode HTML function somewhere (similar to URLdecode)?

2010-06-24 Thread Tony Breyal
Thank you kindly Henrique, that works perfectly for me. On 24 June 2010 15:25, Henrique Dallazuanna wrote: > Try this: > > library(XML) > xmlValue(getNodeSet(htmlParse(x, asText = TRUE), "//p")[[1]]) > > On Thu, Jun 24, 2010 at 6:53 AM, Tony Breyal > wrote: >

Re: [R] is there a Decode HTML function somewhere (similar to URLdecode)?

2010-06-24 Thread Tony Breyal
uot;, "&", "a", "p", "o", "s", ";", "t", sep = "") would become the following, when output to the plain text file: > "isn't" Thank you again for your time, Tony Breyal On 23 June 2010 12:32,

Re: [R] Reading PDF files (using xpdf)

2009-12-22 Thread Tony Breyal
; library(tm) > my.path <- 'C:\\Documents and Settings\\tony\\Desktop\\pdfs\\' #put your pdfs > in here > Corpus(DirSource(my.path), readerControl = list(reader=readPDF)) There are some limitations to how well the conversions work depending on the pdf file, but it was so long

Re: [R] How to average subgroups in a dataframe? (not sure how to apply aggregate(..))

2009-10-21 Thread Tony Breyal
Thank you all for your responses, i have now achieved the desired output for my own real data using your suggestions. I will also have to look into this 'plyr' package as i have noticed that it gets mentioned a lot. On 21 Oct, 13:33, Karl Ove Hufthammer wrote: > In article <800acfc0-2c3c-41f1-af

[R] How to average subgroups in a dataframe? (not sure how to apply aggregate(..))

2009-10-21 Thread Tony Breyal
Dear all, Lets say I have the following data frame: > set.seed(1) > col1 <- c(rep('happy',9), rep('sad', 9)) > col2 <- rep(c(rep('alpha', 3), rep('beta', 3), rep('gamma', 3)),2) > dates <- as.Date(rep(c('2009-10-13', '2009-10-14', '2009-10-15'),6)) > score=rnorm(18, 10, 3) > df1<-data.frame(col1=

[R] How to get NA's into the output of xtabs?

2009-10-05 Thread Tony Breyal
Dear all, Lets say I have the following data frame: > df1 <- data.frame(Show=c('Star Trek', 'Babylon 5', 'Dr Who'), Size=c(0.7, > 0.0, 0.701), Date=as.Date(c('2007-08-03', '2007-08-03', '2007-08-03'), > format='%Y-%m-%d')) > df2 <- data.frame(Show=c('Star Trek', 'Dr Who', 'Torchwood'), Size=c(

Re: [R] retrieve certain part from html

2009-09-23 Thread Tony Breyal
maybe you could modify the following to suit your situation (i use this xPath expression to get links from google): ?htmlTreeParse ?getNodeSet > library(XML) > link <- > 'http://www.google.co.uk/search?hl=en&client=firefox-a&rls=org.mozilla:en-GB:official&hs=2XR&ei=mxa6SojjOeaMjAfJkcDuBQ&sa=X&oi

Re: [R] using an array of strings with strsplit, issue when including a space in split criteria

2009-09-08 Thread Tony Breyal
eers everyone, much appreciated! Tony On 8 Sep, 11:57, Tony Breyal wrote: > UPDATE: > > I'm not sure why, but on my Windows XP 64bit machine, I ran the same > code again and this time it is not working even though it worked > previously. This has been done using the Rgui -

Re: [R] using an array of strings with strsplit, issue when including a space in split criteria

2009-09-08 Thread Tony Breyal
52 attached base packages: [1] stats graphics grDevices utils datasets methods base > On 8 Sep, 09:47, Tony Breyal wrote: > After further investigation it appears that the problem is specific to > my Vista PC. I am able to get the correct results using R 2.9.2 on a > Window XP

Re: [R] using an array of strings with strsplit, issue when including a space in split criteria

2009-09-08 Thread Tony Breyal
ystem type: 32-bit Operating System 2009/9/8 Gabor Grothendieck : > I am using the exact same version of R as you also on Vista > but can't reproduce your result.  For me it splits properly. > > Try starting R like this (modify path if needed) from the > Windows cmd line: >

[R] using an array of strings with strsplit, issue when including a space in split criteria

2009-09-07 Thread Tony Breyal
Dear all, I'm having a problem understanding why a split does not occur with in the 2nd use of the function strsplit below: # text strings > txt <- c("sales to 23 August 2008 published 29 August", + "sales to 6 September 2008 published 11 September") # first use > strsplit(txt, 'published', fixe

[R] Merge data frames but with a twist.

2009-08-27 Thread Tony Breyal
Dear all, Question: How to merge two data frames such that new column are added in a particular way? I'm not actually sure how to best articulate my question to be honest, so i hope showing you what I want to achieve will communicate my question better. Lets say I have two data frames: > DF1 <-

[R] What has happened to the R-Help Google Groups Archive? Alternative?

2009-06-22 Thread Tony Breyal
rnative website which uses a similar structure to google groups? I had a quick browse on the R Wiki (http://wiki.r-project.org/rwiki/doku.php?id=links:links) but didn't see a page with this sort of info. Thank you kindly, Tony Breyal __ R-help@r-proj

Re: [R] 'Errors' with Ubuntu

2009-06-15 Thread Tony Breyal
numbers you mentioned so am not sure if this will help in your situation. My next challenge is working out how to install R on Ubuntu (will try this weekend)! HTH, Tony Breyal On 13 June, 01:18, Len Vir wrote: > Good Day To You All, > > I have installed Ubuntu 9.04 on a Laptop running Vista

Re: [R] Regular expression \ String Extraction help

2009-06-05 Thread Tony Breyal
t; Ted, > > Try using paste with the collapse argument. > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare > greg.s...@imail.org > 801.408.8111 > > >> -Original Message- >> From: r-help-boun...@r-project.o

[R] Regular expression \ String Extraction help

2009-06-03 Thread Tony Breyal
ep1[1], ' ')) > Name <- gsub('[0-9]',replacement='', step2[4]) > step3 <- paste(step2[1], step2[2], step2[3], sep=' ') > paste('C:\\test\\', Name, '\\', step3, '\\', txt, sep='' ) [1] "C:\\test\\Uni

Re: [R] Problem downloading webpages using batchfiles and RCurl from command line in Vista Basic - couldn't connect to host

2009-06-02 Thread Tony Breyal
he internet? Warm Regards, Tony On 2 June, 16:52, Gabor Grothendieck wrote: > On Tue, Jun 2, 2009 at 7:09 AM, Tony Breyal > wrote: > > Dear all, > > > I am having a problem downloading webpages through R when i run it in > > the DOS window under Windows Vista Basic. I

[R] Problem downloading webpages using batchfiles and RCurl from command line in Vista Basic - couldn't connect to host

2009-06-02 Thread Tony Breyal
indows Vista Ultimate, the command line version works correctly and downloads the webpage. I need to get this to work because i need to do some web crawls in batch mode using R. Any help would be most appreciated. Thank you kindly for your time in advance, Tony Breyal > sessionInfo() R

Re: [R] Neural Network resource

2009-05-27 Thread Tony Breyal
de > cbind(my.df["y"], my.nnet.predictions) y my.nnet.predictions 110.60102566 10.59958907 2 6.70939465 6.70956529 3 2.28934732 2.28928930 414.51012458 14.51043732 5 -12.85845371-12.85849345 [..etc] ### R END ###

Re: [R] Neural Network resource

2009-05-27 Thread Tony Breyal
There's a link on the CRAN page for the AMORE package which apears to have some cool information: http://wiki.r-project.org/rwiki/doku.php?id=packages:cran:amore Seems like an interesting package, I hadn't actually heard of it before your post. HTH, Tony On 27 May, 09:13, Indrajit Sengupta wro

Re: [R] C4.5 implementation in R

2009-05-27 Thread Tony Breyal
I think Rweka implements the C4.5 (revision 8) algorithm, but it calls it J4.8 (because it's written in Java instead of C, and also the revision number, and is uses an open source licence, i think). You might want to look at this paper by Schauerhuber, Zeileis & Hornik called 'Benchmarking Open-So

Re: [R] Concatenating two vectors into one

2009-05-18 Thread Tony Breyal
Something like this should work: z<- paste(x,y, sep='') HTH, Tony On 18 May, 12:09, "Henning Wildhagen" wrote: > Dear users, > > a very simple question: > > Given two vectors x and y > > x<-as.character(c("A","B","C","D","E","F")) > y<-as.factor(c("1","2","3","4","5","6")) > > i want to combine

Re: [R] 'Dynamic' 3D plot

2009-05-08 Thread Tony Breyal
Hi Martial, The rgl package is quite nice for this sort of thing: # this is the example in ?plot3d library(rgl) open3d() x <- sort(rnorm(1000)) y <- rnorm(1000) z <- rnorm(1000) + atan2(x,y) plot3d(x, y, z, col=rainbow(1000)) HTH, Tony Breyal On 8 May, 09:25, Martial Sankar wr

Re: [R] How to reuse my self function?

2009-03-04 Thread Tony Breyal
I usually use the ?source function. so at the top of your test2.R file, you would put a line like: source('C:\\test1.R') but with the correct path to where ever you have stored your test1.R file. Hope that helps a little, Tony On 4 Mar, 10:29, Chang Jia-Ming wrote: > Dear all, > > I wrote a

Re: [R] question about 3-d plot

2009-02-27 Thread Tony Breyal
Hi Deepankar The code on the following page looks kind of cool, and also seems to produce something of the type of graph you are after perhaps: https://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/rgl/demo/regression.r?rev=702&root=rgl&sortby=date&view=auto [below is a copy of the code...

Re: [R] Using very large matrix

2009-02-25 Thread Tony Breyal
XP uni laptop :D hope that helps a little, Tony Breyal On 25 Feb, 11:04, Corrado wrote: > Dear friends, > > I have to use a very large matrix. Something of the sort of > matrix(8,8,n) where n is something numeric of the sort 0.xx > > I have not found a way of doing

Re: [R] how to NULL multiple variables of a df efficiently?

2009-02-24 Thread Tony Breyal
Another way is: > subset(df, select=c(var.b, var.c)) though I'd be willing to bet that using %in% is probably faster.[1] Tony [1] Unfortuantly I'm skint :-( On 24 Feb, 20:10, Sean Zhang wrote: > Dear R-helpers: > > I am an R novice and would appreciate answer to the following question. > > Wa

Re: [R] Inference for R Spam

2009-02-24 Thread Tony Breyal
Cheers for that information; I've just registered for the useR meeting in London and then about 10 minutes later got that same bit of spam too which made me a wee bit suspicious. On 24 Feb, 13:39, Thomas Lumley wrote: > The same company caused a complaint about a year > agohttps://stat.ethz.ch/p

Re: [R] Support Vector Machine

2009-02-23 Thread Tony Breyal
There's loads of packages in the Machine Learning R Task View: http://cran.r-project.org/web/views/MachineLearning.html for example: package e1071 (http://cran.r-project.org/web/packages/ e1071/index.html) has a function called svm() On 23 Feb, 15:16, "Meir Preiszler" wrote: > Hi, > > I woul

Re: [R] Filtering a data frame using a string for colum header

2009-02-23 Thread Tony Breyal
various threads here and there. It just seems to me that if > my.df2["DrHorrible"] works, then > my.df2[-"DrHorrible"] should work too, in the same way that my.df2[-2] would. Thanks again, always good to learn new and better ways of doing things, Tony Breyal On

[R] Filtering a data frame using a string for colum header

2009-02-22 Thread Tony Breyal
Hi all, I was just radomly playing with R and got the following error when trying to filter a data frame using a string: > Angel <- c(7,8,6,9,10) > Buffy <- c(8,9,4,9,10) > Firefly <- c(9,9,10,10,10) > DrHorrible <- c(10,9,9,10,10) > my.df <- data.frame(Angel, Buffy, Firefly, DrHorrible) > my.df[

Re: [R] Zoo or TS

2009-02-22 Thread Tony Breyal
;] header2 1 1 2 2 3 3 Hope that helps a little, Tony Breyal On 22 Feb, 04:41, miya wrote: > Hi everyone, > I'm trying to plot some data across time. I have a list of articles, ranks, > date/times, authors, etc. Someone suggested using zoo and someone suggested &

Re: [R] 3D or 4D plot

2009-02-20 Thread Tony Breyal
Wow, i had no idea R was capable of producing graphics like that, smegging awesome! On 20 Feb, 19:28, Duncan Murdoch wrote: > On 2/20/2009 1:55 PM, Duncan Murdoch wrote: > > > > > On 2/20/2009 1:46 PM, kapo coulibaly wrote: > >> Ideally I would want it to look like a rubik cube with each little c

Re: [R] Training nnet in two ways, trying to understand the performance difference - with (i hope!) commented, minimal, self-contained, reproducible code

2009-02-18 Thread Tony Breyal
ks for any help. Tony On 18 Feb, 11:40, Tony Breyal wrote: > Dear all, > > Objective: I am trying to learn about neural networks. I want to see > if i can train an artificial neural network model to discriminate > between spam and nonspam emails. > > Problem: I created my own

[R] Training nnet in two ways, trying to understand the performance difference - with (i hope!) commented, minimal, self-contained, reproducible code

2009-02-18 Thread Tony Breyal
Dear all, Objective: I am trying to learn about neural networks. I want to see if i can train an artificial neural network model to discriminate between spam and nonspam emails. Problem: I created my own model (example 1 below) and got an error of about 7.7%. I created the same model using the Ra

Re: [R] How to create sequence of constant time interval

2009-02-16 Thread Tony Breyal
ahh, didn't see Gabor's solution, that works much better :-) On 16 Feb, 10:00, Suresh_FSFM wrote: > Dear R-Experts, > > seek your help. > > There are two parts I want to deal with. > 1) > I want to create a time interval of say, 30 minutes starting from "00:00:00" > hrs > Thus at the end, I want

Re: [R] How to create sequence of constant time interval

2009-02-16 Thread Tony Breyal
Something like the following might give a few ideas: > start.date <- '2009-01-01' > start.time <- '00:00:00' > interval <- 30 > > increment.mins <- interval * 60 > x <- paste(start.date, start.time) > > for(i in 1:20) { + print(strptime(x, "%Y-%m-%d %H:%M:%S") + i*increment.mins) + } [1] "2009-

Re: [R] copy directory command

2009-02-13 Thread Tony Breyal
Hi Tim, This is what i usually try and do (see ?file.copy) ## R Start... > src.dir <- 'PFO-SBS001\\Redirected\\tonyb\\Desktop\\folderA\\' > dest.dir <- 'PFO-SBS001\\Redirected\\tonyb\\Desktop\\folderB\\' > > file.names <- dir(src.dir) > sapply(file.names, function(x) { +

Re: [R] Choosing a random number between x and y

2009-02-09 Thread Tony Breyal
Hi Vie, Something like the following should be fine: ## R Start... > n<-1 > my.min <- 0 > my.max <- 0.7 > runif(n, my.min, my.max) [1] 0.01145260 ## R end. see ?runif for details. Hope that helps a little, Tony Breyal On 9 Feb, 14:40, Vie wrote: > Hi, > > Ive

Re: [R] Statistics today on xkcd

2009-02-04 Thread Tony Breyal
haha, that made me laugh :-) Here's a cartoon featuring a picture some bloke called R.A. Fisher... http://www.phdcomics.com/comics/archive.php?comicid=905 On 4 Feb, 15:44, Warren Young wrote: > http://xkcd.com/539/ > > Not entirely on topic here, but how often do you see a box plot in a > carto

Re: [R] RCurl unable to download a particular web page -- what is so special about this web page?

2009-01-26 Thread Tony Breyal
n\ [etc...] ## R end. very strange indeed.I use RCurl for web crawling every now and again so i would be interested in knowing why this happens too :-) Tony Breyal On 26 Jan, 13:58, "clair.crossup...@googlemail.com" wrote: > Dear R-help, > > There seems to be a web page I am

Re: [R] How to Run R Programs in a Scheduled Way

2009-01-22 Thread Tony Breyal
;.txt' to '.bat'. If you double click on this .bat file, it will run your script. All you have to do now is have scheduler point to your new .bat file :-) HTH, Tony Breyal P.S. Be careful with windows scheduler (at least in Vista) if you want the same script to run several ti

Re: [R] how to read data from the different worksheets in the same Excel file

2009-01-14 Thread Tony Breyal
helps a little bit, Tony Breyal On 14 Jan, 11:30, "Xin Shi" wrote: > Dear All: > > I am trying to read the data from the different sheet but in the same Excel > file. Does R provide this kind of command to do it? > > Anyone has experience on this? > > Thanks! >

Re: [R] multiple secondary axes

2009-01-14 Thread Tony Breyal
ues", rylab="Descending values", main="Two Y-Axis example") ### R end. Hope that helps a little, Tony Breyal On 14 Jan, 09:29, "Kirsten Thonicke" wrote: > Dear R experts, >     I want to plot a line chart with another secondary axi

Re: [R] problems with download.file() from ftp?

2009-01-12 Thread Tony Breyal
I ran your script on Windows Vista Ultimate, SP1 and it worked fine: ## R start... > url <- > 'ftp://ftp.wcc.nrcs.usda.gov/data/snow/snow_course/table/history/idaho/13e19.txt' > dest <- "//PFO-SBS001/Redirected/tonyb/Desktop/test/downloadtest.txt" > download.file(url, dest) trying URL 'ftp://ftp.

Re: [R] R in the NY Times

2009-01-10 Thread Tony Breyal
“We have customers who build engines for aircraft. I am happy they are not using freeware when I get on a jet.” The lady who made this comment, Anne H. Milley, director of technology product marketing at SAS, has written a response to try and clarify what she meant (funilly enough, i got this link

Re: [R] [R} how to build TermDocMatrix in tm text mining package of R

2009-01-09 Thread Tony Breyal
ctober 2008), under the section 'An Introduction to Text Mining in R': http://cran.r-project.org/doc/Rnews/Rnews_2008-2.pdf Hope that helps a little bit, Tony Breyal On 9 Jan, 14:21, "Kum-Hoe Hwang" wrote: > Howdy Gurus > > I 'd like to ask a question about h

Re: [R] grep : escape "*"

2009-01-09 Thread Tony Breyal
Hi there, you probably want something like: # R grep("\\*", c("/3", "2*3", "4-4")) hope that helps a little, Tony Breyal On 9 Jan, 15:38, "David Hajage" wrote: > Dear R useRs, > > Sorry for this foolish question, but I can't f

Re: [R] Creating file names.

2009-01-08 Thread Tony Breyal
Hi, if i understood correctly, you probably want the something like: ## R format(Sys.time(), "LMSMOD_%b_%d_%y_%H%M") (works on windows, don't know about Mac) Hope that helps a little, Tony Breyal On 8 Jan, 23:47, greggal...@gmail.com wrote: > I have a function that is call

Re: [R] R in the NY Times

2009-01-07 Thread Tony Breyal
18:29, "Ajay ohri" wrote: > you can use google alerts to track media coverage of R using some keywords > > regards, > > ajay > > On Wed, Jan 7, 2009 at 9:52 PM, David M Smith < > > > > da...@revolution-computing.com> wrote: > > On Wed, Jan 7, 2

Re: [R] R in the NY Times

2009-01-07 Thread Tony Breyal
Thank you for posting this, I found it a very enjoyable read! I am curious, is there an archive of 'R in the Media' or 'R in the Press' articles somewhere? It would be interesting to see how the perception of R has changed/evolved over time relative to other packages. Cheers

Re: [R] help

2008-12-15 Thread Tony Breyal
Hi Zahid,I think the following should work, though there's probably a dozen different ways to do what you want i think: a<-7.5 as.integer(a) [1] 7 trunc(a) [1] 7 Hope that helps a little, Tony Breyal On 15 Dec, 07:11, zahid khan wrote: > Dear All > suppose that "a=7.5"

Re: [R] Downloading Reuters data from R

2008-12-11 Thread Tony Breyal
ect answer from your thread. Or maybe a search on r-sig-finance (https:// stat.ethz.ch/pipermail/r-sig-finance/) might bring up something helpful to you. Hope that helps a little bit :-) Tony Breyal. On 11 Dec, 07:40, "Shubha Vishwanath Karanth" <[EMAIL PROTECTED]> wrote: > Hi R,

Re: [R] missing argument

2008-12-10 Thread Tony Breyal
pefully the above is a little helpful :-) Tony Breyal On 10 Dec, 19:09, "jonas garcia" <[EMAIL PROTECTED]> wrote: > Dear list, > I have a question and I'm going to give an example of my problem > > f<- function(d1, d2, d3) > { > d<- d1*d2/d3 > return(d) &

Re: [R] missing argument

2008-12-10 Thread Tony Breyal
?missing never used it myself, but looks like it might help you :-) Tony Breyal. On 10 Dec, 19:09, "jonas garcia" <[EMAIL PROTECTED]> wrote: > Dear list, > I have a question and I'm going to give an example of my problem > > f<- function(d1, d2, d3) > {

Re: [R] RCurl::postForm() -- how does one determine what the names are of each form element in an online html form?

2008-12-10 Thread Tony Breyal
element names i think library(XML) #src.file <- [location of the html code above] html <- htmlTreeParse(src.file, useInternal=TRUE, error=function(...) {}) xpathApply(html, "//body//form//text()", xmlValue) [[1]] [1] "\r\n\tlicenseID: " [[2]] [1] "\r\n\tcontent: &

[R] RCurl::postForm() -- how does one determine what the names are of each form element in an online html form?

2008-12-09 Thread Tony Breyal
ne find out the names of these form elements if one is not given them previously? I hope that the above made sense, and thank you kindly in advance for any help. Tony Breyal. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

Re: [R] Timer

2008-11-24 Thread Tony Breyal
Hi Jaey, I asked a similar type of question last month, maybe it might be helpful to you: https://stat.ethz.ch/pipermail/r-help/2008-October/176645.html Warm Regards, Tony Breyal On 24 Nov, 08:21, "jaey.ahn" <[EMAIL PROTECTED]> wrote: > Hi, is there any function or package

Re: [R] grep for asterisks "*"'s

2008-11-23 Thread Tony Breyal
Hi Robin! Does the following produce what you want mate? ### R START ### > text <- 'this sentence contains an * (i.e. an astrix).' > grep('\\*', text) [1] 1 ### R END ### Regards, Tony Breyal On 23 Nov, 08:41, Robin Clark <[EMAIL PROTECTED]> wrote: >

Re: [R] readPDF() -- unsure how to install xpdf to make this work?

2008-11-17 Thread Tony Breyal
on 'C:\Documents and Settings\tony \Desktop\pdfs\/r-intro.pdf' > ### R END ### not quite sure what what consequence that warning has, but otherwise it's fine to me Cheers, Tony Breyal On 16 Nov, 23:49, "joris meys" <[EMAIL PROTECTED]> wrote: > Hi Tony, > >

Re: [R] readPDF() -- unsure how to install xpdf to make this work?

2008-11-16 Thread Tony Breyal
Hi Uwe, that is what i have now done, following the sugestion from Joris, but unfortuantly that hasn't worked. Cheers, Tony Breyal Ps. i would like to appologise, i am replying to these posts through google.groups.co.uk and there is a delay beween me posting a reply and that post appeari

Re: [R] readPDF() -- unsure how to install xpdf to make this work?

2008-11-16 Thread Tony Breyal
Hi Gabor, yes, i used the link from that website to figure out the steps to setting my path: http://www.computerhope.com/issues/ch000549.htm but i'm still doing something wrong it seems (see my last post in response to Joris). Cheers, Tony Breyal On 16 Nov, 20:07, "Gabor Grothendiec

Re: [R] readPDF() -- unsure how to install xpdf to make this work?

2008-11-16 Thread Tony Breyal
C:\Program Files\Novell\ZENworks\;C:\Program Files\Common Files\Teleca Shared;C: \Program Files\QuickTime\QTSystem\;C:\Program Files\xpdf\ Still didn't work i'm afraid, but cheers for the sugestion. Tony Breyal On 16 Nov, 20:00, "joris meys" <[EMAIL PROTECTED]> wrote:

Re: [R] readPDF() -- unsure how to install xpdf to make this work?

2008-11-16 Thread Tony Breyal
t should work. however so far it hasn't, so not quite sure what to do. but at least in the mean time we have the system () function as a work around. If you can figure out what i'm doing wrong (probably something obvious knowing me!) please do let me know. Cheers, Tony Breyal On 16 Nov, 1

[R] readPDF() -- unsure how to install xpdf to make this work?

2008-11-13 Thread Tony Breyal
labs.com/xpdf/download.html I am able to download this and use it easily from a dos window to convert a pdf file into a txt file. Question: how do i make these tools available to R, so that i can use the readPDF() function? Thank you in advance for any help, and I hope the above made sense

Re: [R] How to suppress errors from htmlTreeParse() function in XML package?

2008-11-05 Thread Tony Breyal
reeParse' file , but i am grateful to you for supplying this form of the the parameter because I had no idea you could use an empty function in this way; brilliant! Cheers, Tony Breyal On 4 Nov, 12:37, Tony Breyal <[EMAIL PROTECTED]> wrote: > Dear R-help, > > The following code

[R] How to suppress errors from htmlTreeParse() function in XML package?

2008-11-04 Thread Tony Breyal
eEntityRef: expecting ';' ### etc. I attempted to use try(expr, silent=TRUE) but that didn't work for me: > try(htmlTreeParse(doc, useInternalNodes = TRUE), silent=TRUE) Many thanks in advance for any help, Tony Breyal ### O/S = Windows Vista Ultimate ### > sessionInfo() R ve

Re: [R] Extracting text from html code using the RCurl package.

2008-10-21 Thread Tony Breyal
) { html = htmlTreeParse(html.files[[u]], useInternal=TRUE) txt[[u]] <- toString(xpathApply(html, "//body//text() [not(ancestor::script)][not(ancestor::style)]", xmlValue)) } print(txt) Cheers, Tony Breyal On 6 Oct, 16:45, Tony Breyal <[EMAIL PROTECTED]> wrote: >

Re: [R] Running R at a specific time - alternative to Sys.sleep() ?

2008-10-21 Thread Tony Breyal
task scheduler - http://www.iopus.com/guides/winscheduler.htm batch files - http://www.statmethods.net/interface/batch.html I was able to write the batch file as a text document, and then after saving it, changed the extension for '.txt' to '.bat' Cheers, Tony Breyal On 13

[R] Running R at a specific time - alternative to Sys.sleep() ?

2008-10-13 Thread Tony Breyal
ello R-Help!') proc.time() - p1 } my.function (5) [1] "Hello R-Help!" user system elapsed 0 0 5 What I would rather do is just put in the time at which I wish R to execute at. Hope that made sense, and thanks for any help in advance! Tony Breyal ### Windo

[R] Extracting text from html code using the RCurl package.

2008-10-06 Thread Tony Breyal
it: > library(XML) > htmlTreeParse(html.file) Many thanks for any help you can provide, Tony Breyal > sessionInfo() R version 2.7.2 (2008-08-25) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom. 1252;LC_MONETARY=English_United Kingdom. 125

Re: [R] changing 'https' to 'http' when using download.file(), any side effects or just use RCurl?

2008-10-01 Thread Tony Breyal
s about the RCurl package (Omegahat Repository), because I honestly can't find the mailing list for it, and ask forgiveness for my earlier post :-) Many thanks, Tony 2008/10/1 Tony Breyal <[EMAIL PROTECTED]> > Dear R-Help, > > From reading the help file, it is my understandin

[R] changing 'https' to 'http' when using download.file(), any side effects or just use RCurl?

2008-10-01 Thread Tony Breyal
s support HTTPS connections, but i got an error when using that and have no idea where the omegahat mailing list is, which is why i'd like to know about removing the 's' in 'https'. If it turns out there is a good reason not to remove the 's', then i will repost on