[S] BOUNCE s-news@wubios.wustl.edu: Admin request: /^subject:\s

Jean Adams (Jean_Adams@usgs.gov)
Thu, 15 Oct 1998 14:36:32 -0600

Approved: 9SNews9
Received: from accessone.com (jaten@blaze.accessone.com [])
by wubios.wustl.edu (8.9.0/8.9.0) with ESMTP id NAA10924
Thu, 15 Oct 1998 13:04:51 -0500 (CDT)
Received: from localhost (jaten@localhost)
by accessone.com (8.8.5/8.8.5/PIH) with SMTP id LAA08498
for <s-news@wubios.wustl.edu>; Thu, 15 Oct 1998 11:04:46 -0700 (PDT)
Date: Thu, 15 Oct 1998 11:04:44 -0700 (PDT)
From: Jason Aten <jaten@accessone.com>
To: "s-news@wubios.wustl.edu" <s-news@wubios.wustl.edu>
Subject: help fetching strings from dataframes
In-Reply-To: <36260F7F.25CB91C7@uconnvm.uconn.edu>
Message-ID: <Pine.GSO.3.96.981015110153.3904B-100000@blaze.accessone.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

I'm trying to figure how to fetch a column of strings from a dataframe
via an automation client. Thus in visual basic:

Private Sub Command1_Click()
Dim pSPlus As Object
Set pSPlus = CreateObject("S-PLUS.Application")

Dim df As Object
Set df = pSPlus.GetObject("DataFrame", "df")

Dim col As Object
Set col = df.GetObject("character", "variables")

returned = col.ColumnDataAsArray

End Sub

Where I've made a little dataframe called "df" with a column called
(following the example from Krause and Olson, chapter 4):

> variables <- c("GDP","Pop","Inflation")
> df <- data.frame(variables)

The puzzle:
when I look at "returned" in the example I get 3 numbers (1, 3,
2) instead of 3 strings!

I've tried:
using the splus45\samples\oleauto\senddata example to fetch
a dataframe contents that I've modifed to have a column of strings. It
only fetches the first letter of each string!

Anyone have any suggestions?



This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news