notes/jupyter/r.md

34 lines
674 B
Markdown
Raw Normal View History

2020-04-27 14:13:43 -04:00
using grid.arrange
https://cran.r-project.org/web/packages/gridExtra/vignettes/arrangeGrob.html
set and mirror axis limits:
```
scale_y_continuous(
breaks=seq(glob$PriceMin, glob$PriceMax, round(glob$StdDev * .5,2)),
limits = c(glob$PriceMin, glob$PriceMax)
) +
```
how to loop through rows of a column
```
for (i in dim1) {
for (j in i) {
print(j);
}
}
```
build a list of plots and use grid.arrange
```
do.call(grid.arrange,plot_list)
```
re-sort a dataframe and print each row of a column
```
dim1 <- dim1[order(dim1$list),];
for (i in dim1) {
for (j in i) {
print(j);
}
}
2020-04-21 12:31:40 -04:00
```