一直在处理Twitter数据。主要思想是计算一个人的唯一单词的数量及其频率。文本数据位于csv文件中,为了删除停用词,采取了以下方法
下面是代码:
class MoviesController < ApplicationController
before_action :find_movie, only: [:show, :edit, :update, :destroy]
def index
end
def new
@movie = Movie.new
end
def create
@movie = Movie.new(movie_params)
if @movie.save
redirect_to movie_path(@movie)
else
flash[:danger] = "Please try again!"
redirect_to new_movie_path
end
end
private
def find_movie
@movie = Movie.find(params[:id])
end
def movie_params
params.require(:movie).permit(:title, :year, :genre, :poster, :director, :plot, :rating, :list_ids => [])
end
end
并出现以下错误
filter_impl(.data,quo)中的错误:评估错误:参数
abcd_tweets <- abcd %>% filter(!str_detect(text, "^RT")) %>% mutate(text = str_remove_all(text, remove_reg)) %>% unnest_tokens(word, text, token = "tweets") %>% filter(!word %in% stop_words$word, !word %in% str_remove_all(stop_words$word, "'"), str_detect(word, "[a-z]"))
应该是字符向量(或可强制转换的对象)。
我在Windows上使用R版本3.5.0。谁能帮我吗?