Hi, thanks. But why don't you use: cat(glue("There are **{nrow(diamonds)}** diamonds in the dataset.")) instead of: glue("There are **{nrow(diamonds)}** diamonds in the dataset.") Same output but the later one is simpler.
Correct, by default if you give the name of a variable, it gets printed so all three will give you same results. cat (glue('There were {nrow(diamonds)} diamonds in the dataset. ')) glue('There were {nrow(diamonds)} diamonds in the dataset. ') print(glue('There were {nrow(diamonds)} diamonds in the dataset. '))
Hi, thanks. But why don't you use:
cat(glue("There are **{nrow(diamonds)}** diamonds in the dataset."))
instead of:
glue("There are **{nrow(diamonds)}** diamonds in the dataset.")
Same output but the later one is simpler.
Correct, by default if you give the name of a variable, it gets printed
so all three will give you same results.
cat (glue('There were {nrow(diamonds)} diamonds in the dataset. '))
glue('There were {nrow(diamonds)} diamonds in the dataset. ')
print(glue('There were {nrow(diamonds)} diamonds in the dataset. '))