Re: [R] system2 commands with backslash

2013-10-11 Thread Zev Ross
1:24 PM, Henrik Bengtsson wrote: system2("sed", args=c("-i", "s/oldword\\s/newword/g", "d:/junk/x/test.tex")) /Henrik On Fri, Oct 11, 2013 at 8:58 AM, David Winsemius wrote: On Oct 10, 2013, at 8:16 AM, Zev Ross wrote: Hi All, I'm trying to edit a file i

[R] system2 commands with backslash

2013-10-10 Thread Zev Ross
would prefer not to have quadruple slashes etc. I'm using Windows 7, 64 bit. Zev -- Zev Ross ZevRoss Spatial Analysis 120 N Aurora, Suite 3A Ithaca, NY 14850 607-277-0004 (phone) z...@zevross.com __ R-help@r-project.org mailing list https://stat

[R] read.xls - ampersand different in XLS and XLSX

2012-03-08 Thread Zev Ross
Hi All, I'm using read.xls from GDATA and it seems to be treating ampersands differently depending on whether the source file is an XLS or the more current XLSX. Ampersands from an XLSX become &. As a test I have a csv: write.csv(data.frame(a=c("JERRY", "DICK & LINDA")), "ampersand.csv", ro

Re: [R] Reclassify string values

2011-11-03 Thread Zev Ross
uot;Group2", "Group2")) [1] "Group1" "Group2" "Group1" "Group2" "Group1" "Group1" Zev On 11/3/2011 3:13 PM, Peter Langfelder wrote: On Thu, Nov 3, 2011 at 11:59 AM, Zev Ross wrote: Hi All, Is there a simple way to co

[R] Reclassify string values

2011-11-03 Thread Zev Ross
Warning message: In `levels<-`(`*tmp*`, value = c("Group1", "Group1", "Group2", "Group2" : duplicated levels will not be allowed in factors anymore -- Zev Ross ZevRoss Spatial Analysis 120 N Aurora, Suite 3A Ithaca, NY 14850 607-277-0004 (phone) 866

[R] xtable - caption missing with float=FALSE

2011-08-10 Thread Zev Ross
;FLOAT"), floating=FALSE) print(xtable(atable, caption="NO FLOAT"), floating=TRUE) @ \end{document} Sweave("test.Rnw") texi2dvi("test.tex", pdf=TRUE, clean=TRUE) -- Zev Ross ZevRoss Spatial Analysis 120 N Aurora, Suite 3A Ithaca, NY 14850 607-277-

Re: [R] Add header line to large text file

2010-04-15 Thread Zev Ross
Thanks to Wensui Liu and Jim Holtman for responses. Using sed was a good, quick (non-R) suggestion. Thanks! Zev Wensui Liu wrote: if i were you, i probably will use 1 line of sed to do such task instead of R to insert headers in the file. On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross [1

[R] Add header line to large text file

2010-04-15 Thread Zev Ross
x27;m working on Windows XP. Zev input<-readLines("c:/junk/forR.csv") input<-c(c('"a", "b", "c", "d", "e", "f"'), input) writeLines(input, "c:/junk/forRfix.csv") -- Zev Ross ZevRoss Spatial

[R] RMySQL Fail to connect on update to R 2.8.1

2009-01-23 Thread Zev Ross
registry search" etc so perhaps the problems are partly related to the installation process) Could a more savvy user than me give me some guidance? Zev -- Zev Ross ZevRoss Spatial Analysis 120 N Aurora, Suite 3A Ithaca, NY 14850 607-277-0004 (phone) 866-877-3690 (fax, toll-free) z...@zev

Re: [R] Read text file subsetting rows

2008-04-11 Thread Zev Ross
'grep "^RD" tmp.dat' ) dat2 <- read.csv( con2, sep='|', header=FALSE) works well! Thank you, Zev Charles C. Berry wrote: > On Fri, 11 Apr 2008, Zev Ross wrote: > >> Hi All, >> >> Can anyone direct me to a read function in R that will al

[R] Read text file subsetting rows

2008-04-11 Thread Zev Ross
006-0.txt' dlm='|' firstobs=3 missover; rectype $2. @; if rectype = 'RD' then do; -- Zev Ross ZevRoss Spatial Analysis 303 Fairmount Ave Ithaca, NY 14850 607-277-0004 (phone) 866-877-3690 (fax, toll-free) [EMAIL PROTECTED] __

[R] Space Filling and Weights

2007-10-26 Thread Zev Ross
Hi All, I've been working with the cover.design function in the fields package for space filling. I'm wondering though if there is a way, or if anyone has written scripts to include weights at candidate locations in the space filling algorithm. This would be similar to maximum attendance and p