Displaying 20 results from an estimated 700 matches similar to: "RODBC / odbcConnectExcel Issue"
2009 Sep 24
2
RODBC problem
Hi,
I'm attempting to use the RODBC package on Windows Vista to import an
excel spreadsheet. The spreadsheet has three worksheets the last of
which is blank. Following an example in Phil Spector's book (p. 34),
after creating a connection named con I did the following:
> con
RODBC Connection 3
Details:
case=nochange
DBQ=c:\temp\test.xls
DefaultDir=c:\temp
2010 Aug 04
1
Question regarding S4 objects and reading in excel data with RODBC
L.S.
I am trying to get data from an excel sheet using the RODBC library, quite
like the example on page 34 of the 'Data manipulation with R' book written
by Phil Spector. It seems very straightforward, yet I get the same error
everytime I try it, with different excel sheets and trying to tweek the code
a bit. This is what I do:
library(RODBC)
sheet='X:\\example.xls'
2009 Jan 17
1
Downloading Excel file & reading a range
I am trying to figure out a way to download an Excel file and then read a
range into R - so that i can have a reasonably automated process. I have
been trying to use the RODBC package, but with little success. I suspect
that this isnt the right route
Here is some code. My aim is to read in the data starting in H69:H283 in
sheet 2.
2008 Jan 10
5
diff in a dataframe
I have a dataframe say:
date price_g price_s
0.34 0.56
0.36 0.76
. .
. .
. .
and so on. say, 1000 rows.
Is it possible to add two columns to this dataframe, by computing say
diff(log(price_g) and diff(log(price_s)) ?
The elements in the first row of these columns cannot be computed, but
2007 Oct 15
3
for loop if else conditional
date <- as.POSIXlt(Sys.time()) #present date
for (i in 1:difftime(as.POSIXlt(Sys.Date()),"2007-10-01"))
if (date$wday != 0 & date$wday != 6) {print(date);assign("date",
(date-86400))} else (assign("date", (date-86400)))
I am trying to print dates from present day to a day in the past, but
omitting weekends. I am not doing something right, but can't
2007 Oct 16
1
try / tryCatch for download.file( ) within a for loop when URL does not exist
I am trying to download a bunch of files from a server, for which I am
using download.file( ) within a for loop. The script is working fine
except until download.file hits a URL which has no file, at which
point it exits. I want to change this behavior to simple log the
failure and maintain state within the for loop and iterate to next. I
read about try / tryCatch but am having trouble
2009 Mar 26
1
ApEn (Approximate Entropy), Total Corr, Information Interaction
Is there any existing implementation in R/S of :
1] Pincus & Kalman's approximate entropy (ApEn) measure
2] Total Correlation / Multiinformation
3] Information Interaction
A search doesn't quite reveal anything, but I'd be keen to not
reinvent in case someone has worked on it. Many thanks in
anticipation.
Best,
Vishal Belsare
2007 Oct 15
1
String concatenation, File Path Handling to pass to download.file( ) [backslash in DOS paths]
Gabor,
Thanks much. Your solution is elegant. My overall scheme is to take
present date, and check whether it is a weekend, if not, then create a
string based on the date, to concatenate into a url link for
download.file( ). The files I need to download have a part which is in
the format: mmddyy. I am working to make myself a system to connect to
exchanges, and download end of day files from
2008 Jan 14
1
zoo object
I have an ordered series of 3 month t-bill rates (annual). I transform
this to a daily series, however, the observations are constructed only
from the dates on which the t-bills were issued, which is every week.
So now I have ordered observations of the daily 'risk-free rate' for
one day every week. I want to expand this zoo object to give a value
for every day, and to do so, copy the
2008 May 25
1
n Realizations of a Stochastic Process assigned to dynamically generated variable names?
I am interested in creating multiple (say 1000) time series, from a
given stochastic process, of length 250. I want to refer to each
realization with its own variable name, of the format say, tsn, where
n is the n'th simulation. i.e. ts1, ts2, ts3, ts4, .... , ts1000
The way I am thinking of doing this is placing the following code
within another loop, and the 'tsn' assignment should
2008 May 31
1
Representing 'Date' as 'Year - Quarter'
I have financial data on a a set of firms, with a quarterly period
(fundamental data). The data spans 10 years, and four quarters per
year. The present file (.csv) reads the Date columns as "200706" for
the second quarter of 2007; "199809" for the third quarter of 1997.
Is there a way I can convert it to something like "2007 Q2", "1998 Q3"?
I am aware of
2007 Aug 14
4
Import of Access data via RODBC changes column name ("NO" to "Expr1014") and the content of the column
Dear all,
I have some problems with importing data from an Access data base via
RODBC to R. The data base contains several tables, which all are
imported consecutively. One table has a column with column name "NO". If
I run the code attached on the bottom of the mail I get no complain, but
the column name (name of the respective vector of the data.frame) is
"Expr1014" instead
2005 Dec 15
2
Why is bubbles() creating empty png graphs?
This code below produces empty XXX.png files - if I use plot(), it works
and if I enter the commands
png(filename=fn)
bubble(positions, do.sqrt=FALSE, main=q)
dev.off()
manually, it works as well.
I am lost - any help appreciated.
The weird thing is that it worked before I made some changes... (I don't
have a copy of the working version...).
R version:
platform i686-pc-linux-gnu
arch
2013 Sep 22
2
[LLVMdev] Bad permissions for mapped region
Hi List,
I'm trying to upgrade our llvm-c based compiler from JIT to MCJIT.
While trying to do so I encountered several problems. Looks like C
API does not have proper functions to intialize LLVM with MCJIT.
I ended up wrapping the following functions in my own init routine.
LLVMInitializeX86TargetInfo();
LLVMInitializeX86Target();
LLVMInitializeX86TargetMC();
LLVMInitializeX86AsmPrinter();
2013 Sep 22
0
[LLVMdev] Bad permissions for mapped region
I managed to make it work by cloning code from lli and making my own cpp
wrapper.
2013/9/22 Konstantin Olkhovskiy <lupus at oxnull.net>
> Hi List,
>
> I'm trying to upgrade our llvm-c based compiler from JIT to MCJIT.
> While trying to do so I encountered several problems. Looks like C
> API does not have proper functions to intialize LLVM with MCJIT.
> I ended up
2009 Aug 13
1
using the RODBC for excel
Hi,
I am trying to import data directly from an excel spreadsheet using the RODBC package. I am getting the following error messages, wondering if anyone can help me with it?
> connection = odbcConnectExcel('D:\\R files\\TestData.xls')
> tables = sqlTables(connection)
> tables
TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS
1 D:\\R files\\TestData <NA>
2009 Jan 05
1
error message of RODBC...
channel <- odbcConnectExcel("nuova tabella terapia occupazionale mod.xls")
> ## list the spreadsheets
> sqlTables(channel)
TABLE_CAT
TABLE_SCHEM TABLE_NAME
1 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod
<NA> 'emi tot 2006 OAI_60g TO FU1$'
2 c:\\TABELLE DEFINITIVE\\nuova
2011 Mar 01
0
odbcConnectExcel2007 creates corrupted files
I tried creating a .xlsx file using odbcConnectExcel2007 and adding a
worksheet with sqlSave. This seems to work, I am even able to query the
worksheet, but when I try opening the file in Excel I get the following
message: "Excel cannot open the file 'test.xlx' because the file format or
file extension is not valid. Verify that the file has not been corrupted and
that the file
2007 Aug 31
3
Ajax.Updater on a select list not updating correctly in IE7 (fine in FireFox)
Hi all,
Been working with prototype and script.aculo.us now for around 3 days
after never really touching javascript so I am still getting to grips
with things.
So far I have successfully created 4 ajax based functions, or so I
thought until I stupidly showed a client one of them before I had
tested it in IE.
The function in question works fine in FireFox succesfully inserting
any new values
2006 Apr 01
4
-newbie | RODBC import query
Greetings -
After 20+ years of using SAS, for a variety of reasons, I'm using [R]
for a bunch of things - while I'm getting a pretty good a handling
[R] for script programming, and statistical analysis, I'm struggling
with 'pulling data into [R]'. For reasons beyond my control, a number
of the files I get sent to 'work with' are in Dbase format (*.dbf).
For