Send me a copy of your file so I can see what it looks like and what the output
should be.
Sent from my Verizon Wireless 4G LTE Smartphone
Original message From: Sun Shine
Date:03/03/2015 09:43 (GMT-05:00)
To: jim holtman Cc: r-help
Subject: Re: [R] Using a text file
You seem to be conflating the data input operation with your data processing.
You need to stop and examine the in-memory representation of your data
{"userStopList"), and compare it with the expectations of your data processing
operation ("tm_map"). Then adjust your input data by choosing a diff
Hi again
I've now had the chance to try this out, and using scan() doesn't seem
to work either.
This is what I used:
1) I generated a plain text file called stopDict.txt. This file is of
the format: "a, bunch, of, words, to, use"
2) I invoked scan(), like this:
> userStopList <- scan(text
Thanks Jim.
I thought that I was passing a vector, not realising I had converted
this to a list object.
I haven't come across the scan() function so far, so this is good to know.
Good explanation - I'll give this a go when I can get back to that piece
of work later today.
Thanks again.
Re
The 'read.table' was creating a data.frame (not a vector) and applying
'c' to it converted it to a list. You should alway look at the object
you are creating. You probably want to use 'scan'.
==
> testFile <- "Although,this,query,applies,specifically,to,the,tm,package"
> # re
5 matches
Mail list logo