ropensci / baRcodeR

Labeling, tracking, and organizing samples with 2D barcodes
https://docs.ropensci.org/baRcodeR
GNU General Public License v3.0
36 stars 12 forks source link

Adding input checks for escape characters and tab formatting on labels #15

Closed yihanwu closed 5 years ago

yihanwu commented 5 years ago

For labels coded directly into r, \n will create a new line in the text label. \t will not work and has to be replaced by a number of \x20. See this post Something like

Row:1   Column:1
Row:2   Column:2

desired on a label will have to be encoded as "Row:1\x20\x20\x20\x20Column:1\nRow:2\x20\x20\x20\x20Column:2" with 4 spaces in place of a tab character.

For labels being read in from a csv (such as the add-in), R automatically escapes the inline escape character. Input checks to manually replace the \n and the \t have to be created.

Mention this in documentation as well.

yihanwu commented 5 years ago

18