
Last chance! 50% off unlimited learning
Sale ends in
Add a break or new line without breaking words. Automatically,
the function can detect your plot's width and will dynamically
set an auto width. You can adjust the relation (rel) parameter
for different fonts and sizes until perfect harmony found.
Quite similar to stringr::str_wrap
but, if the text vector
is a factor, the levels will be kept in order and transformed.
autoline(text, top = "auto", rel = 9)
Character or factor vector.
Integer. How many characters aprox. should be on each line?
Numeric. Relation of pixels and characters per line
Character. String (vector) including some \n
within.
Other Tools:
bindfiles()
,
bring_api()
,
db_download()
,
db_upload()
,
export_plot()
,
export_results()
,
get_credentials()
,
h2o_predict_API()
,
h2o_predict_MOJO()
,
h2o_predict_binary()
,
h2o_predict_model()
,
h2o_selectmodel()
,
haveInternet()
,
image_metadata()
,
importxlsx()
,
ip_data()
,
json2vector()
,
listfiles()
,
mailSend()
,
msplit()
,
myip()
,
quiet()
,
read.file()
,
statusbar()
,
tic()
,
try_require()
,
updateLares()
,
zerovar()
# NOT RUN {
cat(autoline("This is a long text that may not fit into a single line", 8))
text <- factor(c("First value", "Second value", "First value"),
levels = c("First value", "Second value")
)
autoline(text, 1)
path <- file.path(R.home("doc"), "THANKS")
text <- paste(readLines(path), collapse = " ")
cat(autoline(text))
# }
Run the code above in your browser using DataLab