-1

Sorry if the question is simple!

I have an excel database, .xlsx format. However I wanted to convert it to the df <- structure(list(.......) format so it's playable for you. Is there any way to do this?

Thanks!!

  • It's unclear what you mean. Are you just asking how to import an xlsx file in R? There are several packages that do that (xlsx, openxlsx, readxl all come to mind) – camille Aug 26 '21 at 21:15
  • I would like to turn my database into a reproducible example. How can I do this? For example, I can insert from my database into a repository to be downloaded, what are the other solutions? –  Aug 26 '21 at 21:22
  • Are you just looking for the reprex guidance? https://stackoverflow.com/q/5963269/5325862 – camille Aug 26 '21 at 22:33

1 Answers1

0

Update

dput(df)

One way could be with readxl:

install.packages("readxl")

library("readxl")

my_data <- read_excel("my_file.xls")
TarJae
  • 72,363
  • 6
  • 19
  • 66
  • As far as I know, this is a way for me to read the file of excel, right. But I would like to make a reproducible example for you of this database, so what are the ways I can show this my database to you? I thought about transforming it into `df <- structure(list(.......)` –  Aug 26 '21 at 21:17
  • 1
    `dput(my_data)`? – r2evans Aug 26 '21 at 21:20
  • It was `dput` even what I needed. Thanks! –  Aug 27 '21 at 04:05