Message-ID: <EBA67DF5-B693-4FE0-9888-CCA04BE2702F@comcast.net>
Date: 2013-01-20T02:09:40Z
From: David Winsemius
Subject: Merge 2 columns into 1 column
In-Reply-To: <359E19CE16724C85BE584195C601BEF9@gmail.com>
On Jan 19, 2013, at 8:08 AM, qt2hot4u at gmail.com wrote:
> Hey everyone,
>
> I just can?t wrap my head around this problem: I got 2 Columns with 4 columns.
OK, this is simply incoherent.
> They basically look like this:
> 1 2 3 4
> ? ? ? ?
>
> I want to merge the two CSVs into a two-column list, which should look like this:
> 1 & 3 2 & 4
> ? ?
> ? ?
>
> This is what I came up with so far:
> files <- paste(list.files(files.dir, pattern = "*.csv"), sep = "")# Scan
> mergedfiles <- do.call("rbind", lapply(files, read.csv)) # Merge
>
> Obviously this will only merge the two CSVs into a four column list.
I doubt that claim. Can you provide a reproducible example to prove me wrong?
> Is there any way to merge columns 1 & 3 and columns 2 & 4 of both files into a single list?
>
> Thanks and all the best
> Kenji
>
>
>
> [[alternative HTML version deleted]]
--
David Winsemius
Alameda, CA, USA