I have a .rar archive that contains a file csv. The .rar has a password and I want to read it with R Studio ( the csv is the only file into the .rar).
I tried to do it with the following code:
library(Hmisc)
getZip("datos/diarios.rar", password = "israel")
But R returned this:
A connection with
description "C:\\WINDOWS\\system32\\cmd.exe /c unzip -p -P israel datos/diarios.rar"
class "pipe"
mode "r"
text "text"
opened "closed"
can read "yes"
can write "yes"
How can I resolve this problem?
When I run read.csv
on it, it doesn´t work. Look at:
read.csv(gzfile("datos/diarios.zip", open = ""), header = T)
Error in read.table(file = file, header = header, sep = sep, quote = quote, : more columns than column names In addition: Warning messages: 1: In read.table(file = file, header = header, sep = sep, quote = quote, : line 1 appears to contain embedded nulls 2: In read.table(file = file, header = header, sep = sep, quote = quote, : line 2 appears to contain embedded nulls
read.csv
on this