nd your problem corrrectly.
>
>
>
> Cheers
>
> Petr
>
>
>
>
>
> *From:* Shivi Bhatia [mailto:shivipm...@gmail.com]
> *Sent:* Thursday, March 2, 2017 2:06 PM
> *To:* PIKAL Petr
> *Cc:* R-help
> *Subject:* Re: [R] Reading Multiple Files for Text Mining in R
need to use setwd.
But maybe I do not understand your problem corrrectly.
Cheers
Petr
From: Shivi Bhatia [mailto:shivipm...@gmail.com]
Sent: Thursday, March 2, 2017 2:06 PM
To: PIKAL Petr
Cc: R-help
Subject: Re: [R] Reading Multiple Files for Text Mining in R Using TM Package?
Hi Pik
Hi Pikal,
So i understand it correctly you are advising to temporarily change the
working directory using the setwd syntax.
Thanks, Shivi.
On Thu, Mar 2, 2017 at 6:33 PM, PIKAL Petr wrote:
> Hi
>
> Hmm, if you need only three files why not copy them to another directory
> and use the same comm
Hi
Hmm, if you need only three files why not copy them to another directory and
use the same command for reading them from that other directory.
You probably could do this from R itself however I am almost sure that doing
this task by OS is far less complicated.
Cheers
Petr
> -Original M
Hi
First you shall move your folders to some other place than c:. Let say
c:\project\country\...
after that you can list folders by ?list.dirs and files by ?list.files.
you can then navigate directories by ?setwd, ?getwd and read files from them.
The exact code depends on what exactly you have
Actually the problem occurred in the command:
names = substr (filenames, 1, 7)
As the file's names are:
Dados1.raw, Dados2.raw, ..., Dados11.raw, Dados12.raw, ..., Data 35.raw
the program doesn't work. A quick way to make it work is rename the files to:
Dados01.raw, Dados02.raw, ..., Dados11.r
Hi,
I didn't notice problems with this.
> Will your data be read in correctly if you do away with the colClasses
> argument to read.delim (or read.table)?
>
> Jean
>
>
>
> "Silvano Cesar da Costa" wrote on 09/26/2012 09:11:33 AM:
>>
>> Hi,
>>
>> I have 35 data files for reading. I would like ge
If your previously posted code worked with files all having the same
number of columns, and if your data is read in correctly without the
colClasses argument, then I think the following code should work.
for(i in names){
filepath = file.path("~/Silvano/Dados", paste(i, ".raw", sep=""))
On 26 Sep 2012, at 16:11 , Silvano Cesar da Costa wrote:
> Hi,
>
> I have 35 data files for reading. I would like get a program for
> performing reading of 35 files at once.
> All are of the type: Dados1.raw, Dados2.raw and so on.
>
> If the files have the same number of columns, I can read wit
Will your data be read in correctly if you do away with the colClasses
argument to read.delim (or read.table)?
Jean
"Silvano Cesar da Costa" wrote on 09/26/2012 09:11:33 AM:
>
> Hi,
>
> I have 35 data files for reading. I would like get a program for
> performing reading of 35 files at once
10 matches
Mail list logo