Skip to content

Instantly share code, notes, and snippets.

@jlehtoma
Created September 3, 2012 14:39
Show Gist options
  • Save jlehtoma/3609782 to your computer and use it in GitHub Desktop.
Save jlehtoma/3609782 to your computer and use it in GitHub Desktop.
Trouble with RStudio, Knitr and table()
```{r data_load, warning=FALSE, echo=FALSE, cache=FALSE}
actual.data <- load.finrisk(fields)
```
```{r rows_per_year, echo=TRUE, cache=FALSE}
# How many rows for each year
manual.data <- c(rep(1992, 6031), rep(1997, 8350), rep(2002, 8491), rep(2007, 6115))
manual.df <- data.frame(VAR1=manual.data)
table(manual.df$VAR1)
table(as.double(actual.data$VUOSI))
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment