Re: [R] Reading Multiple Files for Text Mining in R Using TM Package?

2017-03-02 Thread Shivi Bhatia
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

Re: [R] Reading Multiple Files for Text Mining in R Using TM Package?

2017-03-02 Thread PIKAL Petr
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

Re: [R] Reading Multiple Files for Text Mining in R Using TM Package?

2017-03-02 Thread Shivi Bhatia
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

Re: [R] Reading Multiple Files for Text Mining in R Using TM Package?

2017-03-02 Thread PIKAL Petr
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

Re: [R] Reading multiple files from different folders

2015-08-12 Thread PIKAL Petr
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

Re: [R] Reading multiple files

2012-09-26 Thread Silvano Cesar da Costa
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

Re: [R] Reading multiple files

2012-09-26 Thread Silvano Cesar da Costa
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

Re: [R] Reading multiple files

2012-09-26 Thread Jean V Adams
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=""))

Re: [R] Reading multiple files

2012-09-26 Thread Bretschneider SIG-R
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

Re: [R] Reading multiple files

2012-09-26 Thread Jean V Adams
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