Strange results using dplyr and which

28 views
Skip to first unread message

DrunkenPhD

unread,
Jul 30, 2015, 5:49:28 PM7/30/15
to manipulatr
Hi ALL,

I am experiencing a strange result when using filter function from dplyr and which functions

What I do is read file test attached using command:

df <- read.csv("./data/test.csv",header=TRUE, sep=",")

Than I try to filter df with this commands:

indices <- which(df$Name == "EMILI")

or

indices<-filter(df, Name =="Emili")

Both commands return indices as integer(empty)


What is wrong?


Regards


test.csv

Doug Mitarotonda

unread,
Jul 30, 2015, 5:55:12 PM7/30/15
to DrunkenPhD, manipulatr
Look at your padding: "EMILI   “. You will need to use a regular expression or clean up your raw data.

--
You received this message because you are subscribed to the Google Groups "manipulatr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manipulatr+...@googlegroups.com.
To post to this group, send email to manip...@googlegroups.com.
Visit this group at http://groups.google.com/group/manipulatr.
For more options, visit https://groups.google.com/d/optout.
<test.csv>

Doug Mitarotonda

unread,
Jul 30, 2015, 6:09:49 PM7/30/15
to DrunkenPhD, manipulatr
Look at your padding: "EMILI   “. You will need to use a regular expression or clean up your raw data.

On Jul 30, 2015, at 2:49 PM, DrunkenPhD <end...@gmail.com> wrote:

Reply all
Reply to author
Forward
Message has been deleted
0 new messages