Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Mark Breman
and these (invisible) characters are causing the problem? Kind regards, -Mark- 2013/5/28 Prof Brian Ripley > On 28/05/2013 10:44, Jim Lemon wrote: > >> On 05/28/2013 04:54 PM, Mark Breman wrote: >> >>> Hello List, >>> >>> When i paste a large block

[R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Mark Breman
Hello List, When i paste a large block of R code from an editor to the R command line the execution of the code will often fail at some point because it is not pasted as it was copied. === Example: I copied the following block of code (

Re: [R] Strange space characters in character strings

2010-08-24 Thread Mark Breman
h gsub() by: > gsub("[$,\xc2\xa0]", "", as.character(moose[1, "V3"])) [1] "880370" Kind regards, -Mark- 2010/8/24 J. R. M. Hosking > On 2010-08-23 11:03, Mark Breman wrote: > >> Hello everyone, >> >> I am reading a HTML table from a

[R] Strange space characters in character strings

2010-08-23 Thread Mark Breman
Hello everyone, I am reading a HTML table from a website with readHTMLTable() from the XML package: > library(XML) > moose = readHTMLTable("http://www.decisionmoose.com/Moosistory.html";, header=FALSE, skip.rows=c(1,2), trim=TRUE)[[1]] > moose V1

[R] read numeric values with thousands seperator from csv file

2010-02-11 Thread Mark Breman
Hello, Is there an easy way to read a csv file with numeric values that contain thousands seperators. The file looks like this: Date;opening;High;Low;closing;Volume 12/02/08;4,764.95;4,897.62;4,729.13;4,895.31;- 13/02/08;4,868.02;4,927.81;4,833.85;4,898.60;- 14/02/08;4,942.18;4,962.43;4,877.88;4,

[R] Zoo and numeric data

2009-08-12 Thread Mark Breman
Hi, I have a csv file with different datatypes: 2009-01-01, character1, 10, 20.1 2009-01-02, character2, 11, 21.1 (I have attached the file to this post) I read this file with read.zoo as I want a zoo/xts timeseries: > t = read.zoo("./data.txt", sep=",", dec = ".", header=FALSE) If I look at th