Skip to content

Commit

Permalink
fixed paths in vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
markolalovic committed Jun 20, 2024
1 parent 97cd60b commit b158fc1
Show file tree
Hide file tree
Showing 23 changed files with 26 additions and 16 deletions.
20 changes: 16 additions & 4 deletions dev/fix_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,28 @@
# -*- coding: utf-8 -*-

'''
Script adds:
After running
- `/docs/.nojekyll` for githubpages.
- meta description to index.html DONE
pkgdown::build_site()
Script:
- replaces "reference/figures" with "../reference/figures" in vignette
- adds `/docs/.nojekyll` for githubpages.
- adds meta description to index.html DONE with pkgdown new version
After running pkgdown::build_site()
'''

import os
import sys
import fileinput

def replace(str_wrong, str_right, pathfilename):
''' Replaces all occurrences of str_wrong with str_right in pathfilename. '''
for i, line in enumerate(fileinput.input(pathfilename, inplace=1)):
sys.stdout.write(line.replace(str_wrong, str_right))

if __name__ == '__main__':
replace('"reference/figures', '"../reference/figures', './docs/articles/using_latent2likert.html')
os.system("touch ./docs/.nojekyll")
print("Done.")
11 changes: 5 additions & 6 deletions docs/articles/using_latent2likert.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.0.9
pkgdown_sha: ~
articles:
using_latent2likert: using_latent2likert.html
last_built: 2024-06-20T21:59Z
last_built: 2024-06-20T22:23Z
urls:
reference: https://markolalovic.github.io/latent2likert/reference
article: https://markolalovic.github.io/latent2likert/articles
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
7 changes: 3 additions & 4 deletions vignettes/using_latent2likert.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ data
The results can then be visualized using a grouped bar chart:

<figure>
<img src="/Users/markolalovic/dev/latent2likert/man/figures/vignette/courses-grouped-min.png" width="100%" alt="Grouped bar chart"/>
<img src="man/figures/courses-grouped-min.png" width="100%" alt="Grouped bar chart"/>
</figure>

## Pre and Post Comparison
Expand Down Expand Up @@ -120,7 +120,7 @@ head(data)
And visualize the results with a stacked bar chart:

<figure>
<img src="/Users/markolalovic/dev/latent2likert/man/figures/vignette/courses-stacked-min.png" width="100%" alt="Stacked bar chart"/>
<img src="man/figures/courses-stacked-min.png" width="100%" alt="Stacked bar chart"/>
</figure>


Expand All @@ -131,7 +131,6 @@ We will use part of [bfi](https://search.r-project.org/CRAN/refmans/psych/html/b
Load the data:

```{r}
#load(file="/Users/markolalovic/dev/latent2likert/data/part_bfi.rda")
data(part_bfi)
head(part_bfi)
```
Expand Down Expand Up @@ -188,7 +187,7 @@ new_data$agreeable <- rowMeans(new_data[, c("Y1", "Y2", "Y3", "Y4", "Y5")])
And visualize the results with a grouped boxplot:

<figure>
<img src="/Users/markolalovic/dev/latent2likert/man/figures/vignette/scales-min.png" width="100%" alt="Scales"/>
<img src="man/figures/scales-min.png" width="100%" alt="Scales"/>
</figure>

## References
Expand Down

0 comments on commit b158fc1

Please sign in to comment.