Small edits to work.Rmd
This commit is contained in:
		
							
								
								
									
										4
									
								
								work.Rmd
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								work.Rmd
									
									
									
									
									
								
							@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
With data, the relationships between values matter as much as the values themselves. Tidy data encodes those relationships.
 | 
			
		||||
 | 
			
		||||
Throughout this book we work with "tibbles" instead of the traditional data frame. Tibbles _are_ data frame but encode some patterns that make modern usage of R better. Unfortunately R is an old language, and things that made sense 10 or 20 years a go are no longer as valid. It's difficult to change base R without breaking existing code, so most innovation occurs in packages, providing new functions that you should use instead of the old ones.
 | 
			
		||||
Throughout this book we work with "tibbles" instead of the traditional data frame. Tibbles _are_ data frames but they encode some patterns that make modern usage of R better. Unfortunately R is an old language, and things that made sense 10 or 20 years a go are no longer as valid. It's difficult to change base R without breaking existing code, so most innovation occurs in packages, providing new functions that you should use instead of the old ones.
 | 
			
		||||
 | 
			
		||||
```{r}
 | 
			
		||||
library(tibble)
 | 
			
		||||
@@ -16,7 +16,7 @@ The majority of the functions that you'll use in this book already produce tibbl
 | 
			
		||||
as_data_frame(iris)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
As well as data frames, this function also knows how to convert lists (provided the elements are equal length vectors), matrices, and tables. 
 | 
			
		||||
`as_data_frame()` knows how to convert data frames, lists (provided the elements are equal length vectors), matrices, and tables. 
 | 
			
		||||
 | 
			
		||||
You can also create a new tibble from individual vectors with `data_frame()`:
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user