One more thing to keep in mind is that while base data import functions (like read.csv and read.table) convert strings to factors by default, tidyverse functions (like read_csv from the readr package or read_excel from the readxl package) do not.
With base R functions, to avoid conversion of strings to factors you would do, for example:
x = read.csv("my_file.csv", stringsAsFactors=FALSE)
In readr you can just read the file, as there is no stringsAsFactors argument and no automatic conversion of strings to factors:
library(readr)
x = read_csv("my_file.csv")
However, if you wish you can also use the optional col_types argument to specify whether a particular column should be read in as a factor. See the col_types section of the help for read_csv for details.