Questions tagged [r-rio]

rio: A Swiss-Army Knife for Data I/O

Streamlined data import and export by making assumptions that the user is probably willing to make: 'import()' and 'export()' determine the data structure from the file extension, reasonable defaults are used for data import and export (e.g., 'stringsAsFactors=FALSE'), web-based import is natively supported (including from SSL/HTTPS), compressed files can be read directly without explicit decompression, and fast import packages are used where appropriate. An additional convenience function, 'convert()', provides a simple method for converting between file types.

24 questions
2
votes
5 answers

Importing multiple excel sheets into one dataframe adding the sheet name as variable

I am importing multiple excel sheets into one dataframe using the rio package. WIOD_EA_EmRelEnergy <- import_list("EA 2016/Emission-relevant Energy Accounts_total.xlsx", setclass = "tbl", rbind = TRUE) This line…
VBo
  • 119
  • 8
2
votes
0 answers

Use encoding="UTF-8" in rio

Some of my students got an issue yesterday. I tried to solve it with some code examples from Stackoverflow, but none of them worked for me. I tried to import an .xlsx file and some of the characters like "ü" got replaced by "". It seems that this is…
Lars
  • 132
  • 9
2
votes
1 answer

Install package "rio" because of feather

I try in R to install the CRAN-packages "rio" but receive the following error: install.packages("rio", dependencies = TRUE) Installing package into ‘C:/software/Rpackages’ (as ‘lib’ is unspecified) also installing the dependency ‘feather’ There…
1
vote
0 answers

Import an Excel file that has newline \n as string

I have an Excel file and a cell which contains a newline. 1. , : Yes, number of years: ______,\n : Year at which exposure stopped: _______ After I used the rio package to import the Excel file, I have a double backslash: df <-…
Peter Chung
  • 1,010
  • 1
  • 13
  • 31
1
vote
1 answer

How to filter and edit the data in R?

What I want to do- First read xlsx file with multiple sheets (say 50). Then filter that file out to keep only 8 sheets out of those. I used rio package for it. See the code: #Get the Data Data = import_list("/Users/Data.xlsx"); Here I am trying to…
Chinmay123
  • 23
  • 4
1
vote
1 answer

rio and haven randomly interpret NAs in date column as 1582-10-14 when importing from SPSS

I am importing data from SPSS (sav file). In this data set there are several date columns, several of which contain cells with missing values. All date columns are imported as date variables into R, so far so good. All date entries from SPSS are…
Max
  • 91
  • 7
1
vote
2 answers

Why am I getting this error while trying to import

I'm just started using rio to import as have a .tsv file to work with. I'm having the error with multiple files that no such file exists however my working directory is set correctly and I have affirmed this using getwd(). I've done a search online…
Magnetar
  • 85
  • 8
1
vote
1 answer

Apply wildcard when reading multiple sheets from an .xls file using rio::import_list

I have been trying to write a code that will read selected sheets in an .xls file using import_list (rio package), then rbinding and converting them to a .csv file. So far, I have been able to make the code read either all the sheets in the xls file…
ndichistan
  • 27
  • 7
1
vote
2 answers

Installing RIO Package : shared object ‘haven.so’ not found

I've some problem to install package in R. I write : install.packages("rio", dependencies = TRUE) And it gives the error message: installing source package ‘rio’ ... ** package ‘rio’ correctement décompressé et sommes MD5 vérifiées ** R **…
1
vote
2 answers

Convert XLS to CSV - R (Tried Rio Package)

I have a list of files in a directory which I'm trying to convert to csv, had tried rio package and solutions as suggested here The output is list of empty CSV files with no content. It could be because the first 8 rows of the xls files have an…
Mr Rj
  • 41
  • 1
  • 10
1
vote
2 answers

Can I import a csv file with non comma separator?

Using the import function from the rio package, I am trying to import a csv file with a separator that is not a comma, but I can't get it to import correctly. Example: df <- data.frame(X1 = 1:5, X2 = 101:105, X3 = LETTERS[1:5]) write.table(df, file…
Danny
  • 448
  • 3
  • 15
1
vote
1 answer

Control character encoding in the 'rio' package?

My txt table looks like this: morče kanár malý pes morče potkan rybičky želva rybičky střední pes kočka papoušek želva It is encoded in UTF-8 and stored in file mazlicci.txt. When I try library(rio) import("mazlicci.txt") the…
Silvie
  • 85
  • 1
  • 1
  • 8
0
votes
0 answers

How to convert .xlsx file in R to .xls

I have specific need- one of the uploads I need to do is allowed only in .xls file. So I am reading input in R (input is in .xlsx) via following command: library(rio); Data= import("Table.xlsx",skip=1); Now this Data is a dataframe in R. I want to…
Chinmay123
  • 23
  • 4
0
votes
0 answers

How to export a list of datasets with rio package

I loaded multiple raw datasets by using this code: dfnames<-list.files(here::here("dataset")) dflist<-list() for(i in dfnames){ dflist[[i]]<-rio::import(here::here("dataset", i)) } which in dflist, it contains 5 datasets from the local folder…
Rstudyer
  • 309
  • 1
  • 8
0
votes
1 answer

Importing from a LibreOffice Calc workbook

I have a LibreOffice Calc workbook with three worksheets. I'm trying to import data from the third worksheet. I've tried both the readODS and rio packages, but they keep returning the same error message: Error: .onLoad failed in loadNamespace() for…
Gnosos
  • 47
  • 6
1
2