jdnewmil at dcn.davis.ca.us
Fri Jun 23 01:52:49 CEST 2017
Rows are horizontal, columns are vertical.
You really need to spend some time with an R tutorial.
dta <- read.table( "yourfile", header=TRUE, as.is=TRUE )
dta2 <- dta
dta2$D <- c( "awe", "abcd", "asdf", "xyz" )
dta2 <- dta2[ , c( "A", "D" ) ]
Sent from my phone. Please excuse my brevity.
On June 22, 2017 11:22:57 AM PDT, Amrith Deepak <adeepak at apple.com> wrote:
>I am using Spark and the Sparklyr library in R.
>I have a file with several lines. For example
>A B C
>awer.ttp.net Code 554
>abcd.ttp.net Code 747
>asdf.ttp.net Part 554
>xyz.ttp.net Part 747
>I want to split just column A of the table and I want a new row added
>to the table D, with values awe, abcd, asdf, and xyz. I am trying to
>use a command in the sparkly library to do that. If that’s not
>possible, can you please show me another way to do it.
> [[alternative HTML version deleted]]
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.
More information about the R-help