split - Splitting data from a data.frame of length 1 by using a delimiter in R -
i imported text file r, , have data frame of length 1. had 152 reviews separated * character in text file. each review paragraph long.
how can data frame of length 152, each review being 1 in data frame ? used line import file r :
myreviews <- read.table("c:/users/norbert/desktop/research/important files/airline reviews/reviews/air_can_review.txt", header=false,sep="*")
(myreview
has length if 1 here.)... need 152, number of reviews inside text file.
how can split data data frame "*"
delimiter, or import text file correctly putting data frame of length 152 instead of 1.
edit : example of data
i have 152 of kind of data, separated "*"
:
i boarded air canada flight ac 7354 washington dca next morning, april 13th. after arriving @ dca, discovered dismay suitcase had checked in @ tel aviv not on flight. spent 5 hours @ pearson trying sort out mess resulting bumped connection. *first time in 40 years fly air canada. loved wider seats. disappointed in no movies watch not travelers have i-phones etc. also, on our trip down husband asked twice coffee, black. did not , not offered else. on our trip home, asked black coffee. said making more several travelers had asked. did not coffee or else drink. long trip nothing drink when had asked. when trying attention, seemed avoid tries. found 2 female stewardess's not friendly. may seem small thing frustrating traveler. *painless check-in. 2 legs of 3 on ac: ac105, yyz-yvr. roomy , clean a321 fantastic crew. ac33: yvr-syd, light load , had 3 seats myself. enthusiastic , friendly crew usual on transpacific route take several times year. arrived 20 min ahead of schedule. expected high level of service our flag carrier, air canada. altitude elite member.
they airline reviews, each review separated *. take of reviews , put them in 1 data.frame in r, each review should own "slot" or "position". "*"
intended separator.
Comments
Post a Comment