Marc, et. al,

    Below are all of the pertinent version info.  However, I think versions,
etc., are somewhat irrelevant.  Instead, somewhere there must be an
environment variable or something that 'R' is talking to that is forcing the
column name to fit within a set column width, and I need to either blow away
that variable or make it much larger.
    Again, to recap:  if I make SQL queries outside of 'R', I am able to
grab column names properly.  If I make SQL queries *within 'R' and through a
Windows server*, I grab all column names properly.  However, if I make SQL
queries *within 'R' and through the linux/unix server described below*, the
column names are cut off at a fixed length of 30 characters.
    Any advice as to where to look for this environment variable or whatever
setting would help greatly!

                                 Thanks!
                                    Mike

*OS information:
*Linux
2.6.18-8.1.15.el5
#1 SMP Mon Oct 22 08:32:28 EDT 2007
x86_64
x86_64
x86_64
GNU/Linux


*DB info:
*Microsoft SQL Server Management Studio                        10.0.2531.0
Microsoft Data Access Components (MDAC)
6.1.7600.16385
Microsoft MSXML                        3.0 4.0 5.0 6.0
Microsoft Internet Explorer                        8.0.7600.16385
Microsoft .NET Framework                        2.0.50727.4952
Operating System                        6.1.7600


*'R' info:
*> R.Version()
$platform
[1] "x86_64-redhat-linux-gnu"

$arch
[1] "x86_64"

$os
[1] "linux-gnu"

$system
[1] "x86_64, linux-gnu"

$status
[1] ""

$major
[1] "2"

$minor
[1] "10.0"

$year
[1] "2009"

$month
[1] "10"

$day
[1] "26"

$`svn rev`
[1] "50208"

$language
[1] "R"

$version.string
[1] "R version 2.10.0 (2009-10-26)"





"Telescopes and bathyscaphes and sonar probes of Scottish lakes,
Tacoma Narrows bridge collapse explained with abstract phase-space maps,
Some x-ray slides, a music score, Minard's Napoleanic war:
The most exciting frontier is charting what's already here."
  -- xkcd

--
Help protect Wikipedia. Donate now:
http://wikimediafoundation.org/wiki/Support_Wikipedia/en


On Sat, Oct 2, 2010 at 6:31 AM, Marc Schwartz <marc_schwartz@me.com> wrote:

> On Oct 1, 2010, at 6:26 PM, Mike Williamson wrote:
>
> > Hello all,
> >
> >    I have a strange / interesting problem that might be 'R' settings
> > themselves, or it might be something with the OS.
> >
> >    I am using the RODBC library.  I have a script that goes out and,
> before
> > making a query for a big data set, will first query for the column names
> of
> > the data set.  The column names could sometimes be quite long (e.g.,
> "Time
> > Background Estimation (seconds)" ).  If I make this query for the column
> > names from my Windows laptop or from a Windows server, using
> odbcConnect() &
> > sqlQuery(), I get the column names properly.  However, if I run this via
> > unix, it will chop off part of the column name.  (E.g., with "Time
> > Background Estimation (seconds)", it becomes "Time Background Estimation
> > (se", which is 30 characters long.)
> >
> >    Does anyone have a clue what might be causing this (settings in 'R',
> > something within unix, etc.)?  I am not even sure how to debug, and I
> can't
> > really get around this because I cannot simply query all of the columns,
> the
> > data set would become too large.
> >
> >                                                  Thanks!
> >                                                          Mike
>
>
> Mike,
>
> You indicated 'unix' above. Is that Solaris or are you being generic in a
> reference to a Linux platform?
>
> We need the details of your OS, the version of R you are running and
> whether it is 32 or 64 bit, as well as the database that you are connecting
> to (eg. Oracle).
>
> You can use:
>
>  vignette("RODBC")
>
> from the R command line to bring up a PDF carefully written by Prof.
> Ripley, that contains additional details the use of RODBC and some OS/DB
> specific documentation for the package.
>
> For further details on how we can better help you, see the R Posting Guide:
>
>  http://www.R-project.org/posting-guide.html
>
> Lastly, for future reference, there is an R-SIG-DB list:
>
>  https://stat.ethz.ch/mailman/listinfo/r-sig-db
>
> Marc Schwartz
>
>

	[[alternative HTML version deleted]]

