Thanks you all,
With your recomendations I built my solution as follows:
:> writeLines(c("uno dos tres", "cuatro cinco", "seis"), "tempfile.txt")
:> o <- pipe("wc < tempfile.txt", open="r")
:> readLines(o)
:[1] " 3 6 31"
best regards,
--Sergio.
__
rsplit(vec1, " ")))
#[1] 6
- Original Message -
From: Julio Sergio Santana
To: r-help@r-project.org
Cc:
Sent: Wednesday, September 12, 2012 1:40 PM
Subject: [R] Trying to use pipes in R
Hi,
I'm trying to use pipes in R. By now, I could launch the linux command "wc&
On Wed, Sep 12, 2012 at 12:40:54PM -0500, Julio Sergio Santana wrote:
> Hi,
> I'm trying to use pipes in R. By now, I could launch the linux command "wc"
> (to count words from a text), but
> I don't know how to capture the results, say in a vector of chars...
> Here is the R code I'm trying:
>
>
On 12/09/2012 1:40 PM, Julio Sergio Santana wrote:
Hi,
I'm trying to use pipes in R. By now, I could launch the linux command "wc"
(to count words from a text), but
I don't know how to capture the results, say in a vector of chars...
Here is the R code I'm trying:
:> f <- pipe("wc", open="w")
:>
>
>
>
>
>
> - Original Message -
> From: Julio Sergio Santana
> To: r-help@r-project.org
> Cc:
> Sent: Wednesday, September 12, 2012 1:40 PM
> Subject: [R] Trying to use pipes in R
>
> Hi,
> I'm trying to use pipes in R. By now, I could launch t
Hi,
I'm trying to use pipes in R. By now, I could launch the linux command "wc"
(to count words from a text), but
I don't know how to capture the results, say in a vector of chars...
Here is the R code I'm trying:
:> f <- pipe("wc", open="w")
:> writeLines(c("uno dos tres", "cuatro cinco", "seis")
6 matches
Mail list logo