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
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:
>
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,
; 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
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
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=
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(
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
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 -
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
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:
>
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
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 <-
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
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
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
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
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
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
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 ###
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
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
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
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
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
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...
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
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
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
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
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
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[
;]
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
&
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
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
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
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
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-
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) {
+
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
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
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
;.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
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!
>
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
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.
“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
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
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
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
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
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
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"
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,
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)
&
?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)
> {
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: &
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/
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
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:
>
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,
>
>
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
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
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:
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
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
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
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
) {
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:
>
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
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
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
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
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
74 matches
Mail list logo