r - Print colnames with spaces -
df = readrds('mydata.rds') message('column names: ',colnames(df))
output
column names: col1col2col2col4
how can print spaces like
column names: col1 col2 col3 col4
you can use paste()
. used mtcars
data set , added line-break.
message( "now have following columns: ", paste(colnames(mtcars), collapse = " "), "\nand following rows: ", nrow(mtcars) ) # have following columns: mpg cyl disp hp drat wt qsec vs gear carb # , following rows: 32
Comments
Post a Comment