Skip to content

Commit

Permalink
Merge branch 'master' of github.com:geneticsMiNIng/FactorMerger
Browse files Browse the repository at this point in the history
  • Loading branch information
durszlaczek committed Jun 11, 2017
2 parents 8c57540 + aa38a3a commit 6b495c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vignettes/pisa2012.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ It seems that there exist some differences among countries included in PISA. Let
# Factor Merger

```{r}
pisaIdxSubset <- sample(1:nrow(pisa2012), size = 5000)
pisaIdxSubset <- sample(1:nrow(pisa2012), size = 500)
pisaFM <- mergeFactors(pisa2012[pisaIdxSubset, 1:3],
factor(pisa2012$CNT[pisaIdxSubset]))
pisaFM
plot(pisaFM, responsePanel = "profile")
```
It's faster to use 'hclust' method on a big dataset.
```{r}
```{r, eval = FALSE}
pisaFMHClustMath <- mergeFactors(pisa2012[, 1:3],
factor(pisa2012$CNT),
method = "hclust",
Expand All @@ -101,7 +101,7 @@ plot(pisaFMHClust)
```
Let's now have a try using European countries only.

```{r}
```{r, eval = FALSE}
pisaEuropean <- filter(pisa2012, CNT %in% c("Austria", "Belgium", "Bulgaria",
"Czech Republic", "Germany", "Denmark",
Expand All @@ -124,7 +124,7 @@ plot(pisaFMHClustEurope)

# Another factor - parent occupation

```{r}
```{r, eval = FALSE}
which <- (ocod$code %>% substr(0,2)) %in% (table(ocod$code %>% substr(0,2))
%>% as.data.frame() %>% filter(Freq > 1000))$Var1
Expand Down

0 comments on commit 6b495c9

Please sign in to comment.