'I can't seem to access the data in my file?

library(tidyverse)
y <- read_tsv("assignment_data.tsv")
x <- 1

When I check R console I get the following:

> y <- read_tsv("assignment_data.tsv", header=TRUE)
Error in read_tsv("assignment_data.tsv", header = TRUE) : 
  unused argument (header = TRUE)
> 
> x <- 1
> 

However, I can only access x in the global environment and I can't visualize the data in the file I tried to import.

r


Solution 1:[1]

Regarding your error:

Error in read_tsv("assignment_data.tsv", header = TRUE) : 
  unused argument (header = TRUE)

If you use

?read_tsv

you will find header is not one of the arguments. Instead, you are looking for col_names

Edit: We found out the problem laid within the tsv itself. The number of column names did not match the number of columns (implied by data)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1