I have a laboratory analyzer that generates results in a .csv or .xlsx format, however right now I must manually type the results from the output into our result tracking software system manually because copy-paste doesn't work.
I would like to write an R script that can translate the results from this .csv into the software program, and the best way I can think of is to generate the results as a barcode/QR code which I can then scan in to the software program. To do this, I need a tab-delimited output to be contained within the QR code. So far, I can generate a QR code using the package qrcode
result-by-result, but if I have 50+ results, I can't generate a QR code for each, and I can't figure out how to get the qrcode
package to give me what I need.
# Example dataframe
test <- LETTERS[1:10]
result.one <- rnorm(1:10)
result.two <- rnorm(1:10)
df <- data.frame(test, result.one, result.two)
Expected output is a QR code that can be scanned to generate results that look something like the output from this code:
library("openxlsx")
library("dplyr")
write.xlsx(select(df, test, result.one), file = "H:/R/junk1.xlsx")
write.xlsx(select(df, test, result.two), file = "H:/R/junk2.xlsx")
where junk1 would be one QR code, junk2 would be another, etc...
If I can figure this out, I can save my staff hours of tedious work every day... so this would be a great help!