You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest adding the print statement for every Dplyr function for learners to follow the different outputs every function creates.
For example, the following function from the episode can have the following printing statement after the select( ) statement;
year_country_gdp <- select(gapminder, year, country, gdpPercap)
print(year_country_gdp)
The text was updated successfully, but these errors were encountered:
sndaba
changed the title
Suggestion - Print Statement after Data Frame Manipulation functions #545
Suggestion - Print Statement after Data Frame Manipulation functions
Jul 6, 2022
zkamvar
transferred this issue from swcarpentry/r-novice-inflammation
Dec 15, 2023
Thanks for the suggestion! My sense is that generally print() statements are used on infrequently in R code, since the output can be checked by simply selecting and running the code of interest. I worry that it might be more confusing to break up the dplyr pipe chains any further. In a number of places in the lesson, the output is visualized using either a direct output of the data frame or the use of head() etc.
Hi
I noticed that the functions used in the Data Frame Manipulation with Dplyr episode https://swcarpentry.github.io/r-novice-gapminder/13-dplyr/index.html do not have a print ( ) statement for the output of the dplyr functions.
I suggest adding the print statement for every Dplyr function for learners to follow the different outputs every function creates.
For example, the following function from the episode can have the following printing statement after the select( ) statement;
year_country_gdp <- select(gapminder, year, country, gdpPercap)
print(year_country_gdp)
or
year_country_gdp <- select(gapminder, year, country, gdpPercap)
year_country_gdp
The text was updated successfully, but these errors were encountered: