Turning table data into "atomic vector" in R -


I'm really new to R. I have the following:

  Library (stringr) data and lieutenant; --read.table ("C: /dataAnalysis/dataset_317_1.txt") D & lt; -data [5] set & lt; -str_count (c ("maize", "conmeal", "cock on joke", "satosa"), "satosa") and lit.-stroke (d, "irscilor") vir   

R says:

  & gt; Error: string There should be an atomic vector   

My file tab has a delimited data table, with a string in the fifth column. How can I create data from my table which I read in a nuclear vector If I want to analyze the data, then in the fifth column, click on " D ", your code is wrong to define.

  d <- Data [[5]]   

or

  d  - Data [, 5]   

will work correctly.

Data holds [5] data frame structure , Whereas the data [[5]] or data [, 5] produces only the vector.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -