Relative Content

Tag Archive for dplyrtidyverse

dplyr filter() produces different outcomes on the same dataframe imported by read_tsv and read.table

I’m trying to import a .txt using read_tsv but when filtering columns I end up with a dataframe of 0 obs. Using base r read.table, the subsequent dataframe generates the intended outcome minus rows that match criteria in filter(). I change a column type to character after the read_tsv generated a warning however this did not change the outcome of 0 obs. What can I do with read_tsv to ensure that filter() will produce the intended dataframe that removes a small number of rows that fulfill the criteria?

dplyr produces different outcomes on the same dataframe imported by read_tsv and read.table

I’m trying to import a .txt using read_tsv but when filtering columns I end up with a dataframe of 0 obs. Using base r read.table, the subsequent dataframe generates the intended outcome minus rows that match criteria in filter(). I change a column type to character after the read_tsv generated a warning however this did not change the outcome of 0 obs. What can I do with read_tsv to ensure that filter() will produce the intended dataframe that removes a small number of rows that fulfill the criteria?