Load single-column CSV as value in R
<p>I would like to know how can I convert a single column CSV file (with header) in to a character list in R. I've tried loading it as a data.frame in RStudio and then using as.character but the software gives me a string with random comma separated numbers.</p>

<p>My file has almost 1000 rows and I cannot enter them manually by using </p>

<pre><code>sample = c("97_278", "BR5-045", "10-409", ...)
</code></pre>

<p>My file looks like this (first 5 rows)</p>

<pre><code>Samples
97_278
BR5-045
10-409
BR8-316
97_420
</code></pre>

<p>This is what I get by using as.character under the Values table</p>

<pre><code>sample_char     "c(235, 310, 103, ..."
</code></pre>

<p>This is what I'm looking for</p>

<pre><code>sample_char     chr [1:1000] "97_278" "BR5-045" "10-409"
</code></pre>

<p>with sample_char being the new variable.</p>