Re: [R] How to hide the vector number output in write.table function?

2014-07-03 Thread dstrick1
Can't believe I missed that. Thank you!



--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-hide-the-vector-number-output-in-write-table-function-tp4693469p4693478.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to hide the vector number output in write.table function?

2014-07-03 Thread dstrick1
What I'm trying to do should be simple enough, but I've been having some
trouble - hence this post.

I am attempting to output a tsv file directly from R but for some reason the
write.table function is outputting the vector number for each set of values
and thus offsetting all of my tab delimitations. I'll provide a visual:
 

At the moment, my write.table function looks like the following:
write.table(results, file="name_of_file.csv",
append="FALSE",col.names=c('gageID','sitename','lat','long'),sep="\t"). All
I'd like to do is delete the first column (keeping the header), thus
shifting each column to the left. 

Any ideas?



Thanks,

David



--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-hide-the-vector-number-output-in-write-table-function-tp4693469.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Using CSS package to extract text from html

2014-07-01 Thread dstrick1
This being my first post, I'm sure I'll do something discordant with
convention, so forgive me in advance.

Basically, I am trying to extract text from an html file using the CSS
package in R. However, I am unable to do so because it seems that the text
itself is not identified with any class and thus targeting it via the CSS
function `cssApply` is difficult. 

I'll provide some detailed information so that you may be able to spot
something I've missed. Let's say I want to extract the latitude/longitude
info from the following html:
http://va.water.usgs.gov/duration_plots/htm_7/dp02059500.htm 

Here's what the initial portion of my code would look like:

install.packages('CSS')

library(CSS)

doc<-"http://va.water.usgs.gov/duration_plots/htm_7/dp02059500.htm";

doc<-htmlParse(doc)


Now, considering that the text I want to extract is under the following
Xpath (c&p from Chrome DevTool):
/html/body/table[1]/tbody/tr/td/table/tbody/tr[2]/td[2]/font/text()[1]

Would the next move be to call the text from that path? If you need to see
for yourself how the site's html is configured follow the link and use your
respective browser's inspect element tool. 

Any help would be appreciated. Thanks.





--
View this message in context: 
http://r.789695.n4.nabble.com/Using-CSS-package-to-extract-text-from-html-tp4693347.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.