[R] Running a batch file with an r script

2009-09-08 Thread Daniel Bradley
Hi!

I have a need to do the ridiculous and run a batch file if certain
conditions are met within an R script.  is there a simple way to do so? or
to run dos commands?

Thanks!
Daniel

[[alternative HTML version deleted]]

__
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] Finding and removing non-printable ascii characters in a file

2009-05-26 Thread Daniel Bradley
Hi!

I'm completely confusing myself attempting to solve this one.  Is there a
simple way of removing particular ASCII characters from a CSV file using R.
Hopefully something simpler and faster than cycling through each individual
character and comparing them to a list of characters to remove then deleting
as necessary.

As always, any help would be appreciated.

Thanks!
Dan

[[alternative HTML version deleted]]

__
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] RODBC - XLSX files - dropping/clearing sheets

2009-04-26 Thread Daniel Bradley
Hi!

I'm manipulating XLSX data using RODBC, however a limitation which appears
to be driver based is that you can't clear or drop sheets from the XLSX
files, as per the following example:

 library(RODBC)
 xlsx-odbcDriverConnect(DRIVER=Microsoft Excel Driver (*.xls, *.xlsx,
*.xlsm, *.xlsb);DBQ=c:\\documents and settings\\desktop\\testxlsx.xlsx;
ReadOnly=False)
 sqlClear(xlsx,newsheet2,errors=TRUE)
[1] [RODBC] ERROR: Could not
SQLExecDirect

[2] HY000?Þêÿÿ\003 -5410 [Microsoft][ODBC Excel Driver] Deleting data in a
linked table is not supported by this ISAM.
 sqlClear(xlsx,newsheet2,errors=TRUE)
[1] [RODBC] ERROR: Could not
SQLExecDirect

[2] HY000?Þêÿÿ\003 -5410 [Microsoft][ODBC Excel Driver] Deleting data in a
linked table is not supported by this ISAM.

I'm wondering if anyone has or knows of a work around for this beyond
converting the sheets to CSV files.  For context, I'm trying to update data
on about 20 spreadsheets as a daily event, pulling data from MySql,
formatting it, then overwriting the existing data on the spreadsheets.  This
is the last piece of the puzzle.  Until the next puzzle.


Thanks!
Dan

[[alternative HTML version deleted]]

__
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] joining multiple lists

2009-04-23 Thread Daniel Bradley
Hi!

I'm reading and cleaning data from multiple excel spreadsheets.  All the
data has the same column names and the natural next step is to join the
lists of data together to make one list for reporting purposes.  I had
thought that c(file1data, file2data) would do the trick but that seems to
append the new columns to the list so I end up with duplicate column names
col1 col2 col3 col1 col2 col3 rather than consolidated column
data.  It's obviously a straight forward operation, but damned if I can find
a straight forward explanation on the web.  Any assistance would be most
appreciated!

Thanks!
Dan

[[alternative HTML version deleted]]

__
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.


Re: [R] joining multiple lists

2009-04-23 Thread Daniel Bradley
Merge()!



Thanks!

On Fri, Apr 24, 2009 at 11:26 AM, Daniel Bradley dannyboy...@gmail.comwrote:

 Hi!

 I'm reading and cleaning data from multiple excel spreadsheets.  All the
 data has the same column names and the natural next step is to join the
 lists of data together to make one list for reporting purposes.  I had
 thought that c(file1data, file2data) would do the trick but that seems to
 append the new columns to the list so I end up with duplicate column names
 col1 col2 col3 col1 col2 col3 rather than consolidated column
 data.  It's obviously a straight forward operation, but damned if I can find
 a straight forward explanation on the web.  Any assistance would be most
 appreciated!

 Thanks!
 Dan


[[alternative HTML version deleted]]

__
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] Finding and moving files

2009-04-21 Thread Daniel Bradley
Hi!

I'm at the very beggining of my R experience and I'm hoping someone can
point me in the right direction.  I want to create a script that locates all
files within a directory tree that have certain keywords in their file
names, checks these against files in another location, then copies files
that don't already exist in that other location.

I'm currently tralling through the help reference but I've yet to find
anything that might do the trick.  Any ideas?

Thanks!
Dan

[[alternative HTML version deleted]]

__
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.