Concatenating column when it should only read an entry [closed]

1

I'm using the following code:

library(data.table)

setwd("/home/andre/monografia/") ; getwd()

obj = read.csv(file = "Grup1C0.csv");

tes = obj[4,4]

View(tes)
The path that is in the position [4,4] of the object "obj" is a string of 45 characters, but when I check the value assigned to the "tes" object I get all the entries in column 4 in one vector only. How do I only have the string of my interest in the "tes"?

    
asked by anonymous 04.03.2016 / 01:13

1 answer

1

I solved the problem by changing the read.csv function. Here's the line for example:

Grup1C0 <- read.csv("~/monografia/Grup1C0.csv", row.names=1, stringsAsFactors=FALSE)

The argument really matters, it's StringAsFactors .

    
04.03.2016 / 22:48