Re: [R] object getConnection

From: jim holtman <jholtman_at_gmail.com>
Date: Thu, 24 May 2007 12:42:28 -0400

Will this work for you:

> x <- file('/tempxx.txt',open='r')
> x

  description         class          mode          text        opened
can read     can write
"/tempxx.txt"        "file"           "r"        "text"
"opened"         "yes"          "no"

> summary(x)

$description
[1] "/tempxx.txt"

$class
[1] "file"

$mode
[1] "r"

$text
[1] "text"

$opened
[1] "opened"

$`can read`
[1] "yes"

$`can write`
[1] "no"

> summary(x)$description

[1] "/tempxx.txt"
>

On 5/24/07, mel <mel_at_altk.com> wrote:
>
> Hi,
>
> I use the functions socketConnections() and getConnection()
> which are working fine. Thanks to the authors.
>
> After opening nicely some socketConnection,
> getConnection(3) returns something like :
> description class mode text opened can read can write
> "->127.0.0.1:7496" "socket" "wb" "binary" "opened" "yes" "yes"
>
> I apologize in advance for this probably simple question,
> but how is it possible to get/read the different fields ?
> For example, how to get the "description" field ?
>
> I tried a number of things ... but alas not the right one.
>
> Thanks
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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.
>

-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_stat.math.ethz.ch 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.
Received on Thu 24 May 2007 - 17:08:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 May 2007 - 18:31:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.