Skip to content
Advertisement

how to use untar() in R linux?

I’m getting this error when I use untar()

command used: untar(tarfile = "a.rar", list = TRUE)

JavaScript

It works when I use on my PC (Windows 10) but does not works on another PC (Linux 20.04)

Thanks

Advertisement

Answer

This isn’t correct:

JavaScript

You should specify a tape archive file such as "a.tar", rather than a RAR-format file.

The underlying utility on Windows is being (too?) forgiving, and accepting other archive formats that it knows how to deal with, like RAR. But the public API for the untar() function makes no such promises, so avoid doing that.

Consider calling an external conversion utility beforehand, so a proper tar file will always be available at that point, even if you began with a *.rar file.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement