Creating a data frame (2)

The planets_df data frame should have 8 observations and 5 variables. It has been made available in the workspace, so you can directly use it.

Instruction

Use str() to investigate the structure of the new planets_df variable.

load(url("http://s3.amazonaws.com/assets.datacamp.com/course/intro_to_r/planets.RData")) # Check the structure of planets_df # Check the structure of planets_df str(planets_df) msg = "Do not remove or overwrite the `planets_df` data frame that is already available in the workspace!" test_object("planets_df", undefined_msg = msg, incorrect_msg = msg) test_output_contains("str(planets_df)", incorrect_msg = "Have you correctly displayed the structure of `planets_df`? Use `str()` to do this!") success_msg("Awesome! Now that you have a clear understanding of the `planets_df` data set, it's time to see how you can select elements from it. Learn all about in the next exercises!")

planets_df is already available in your workspace, so str(planets_df) will do the trick.

Previous: 5-4 | Creating a data frame

Next: 5-6 | Selection of data frame elements

Back to Main