Skip to content

Commit

Permalink
Formatting fixes x = y not x=y cc @Nowosad
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Mar 27, 2017
1 parent 45d1b1d commit 0b1722f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 03-attr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ world$pop_density = world$population / world$area
# OR
world = world %>%
mutate(area=raster::area(as(., "Spatial")) / 1000000) %>%
mutate(pop_density=population/area)
mutate(area = raster::area(as(., "Spatial")) / 1000000) %>%
mutate(pop_density = population / area)
```

```{r}
Expand All @@ -126,8 +126,8 @@ summary(world)
# data summary by groups
world_continents = world %>%
group_by(continent) %>%
summarise(continent_pop=sum(population), country_n=n())
world_continents
summarise(continent_pop = sum(population), country_n = n())
world_continents
```

```{r}
Expand Down

2 comments on commit 0b1722f

@Nowosad
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I need to change my habits, such as <-, x=y, library("package"), etc.;)

@Robinlovelace
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem - we can be open minded about about the <- vs = debate- happy to switch but also happy to stick with=` for now if you are unless people really don't like it... Any further thoughts on that?

Please sign in to comment.