Skip to content

Commit

Permalink
rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
hcp4715 committed Apr 19, 2024
1 parent fd6be09 commit 7a9d1e5
Show file tree
Hide file tree
Showing 267 changed files with 100,551 additions and 35 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 设置所有文本文件使用 LF 作为行结束符
* text=auto

# 对于特定的文件类型,如可执行脚本,可以设置执行权限
*.sh exec
7 changes: 0 additions & 7 deletions bookdown_files/Books/Book/.Rproj.user/shared/notebooks/paths
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/2024text+code/1002-lesson2_2024.Rmd="B84230A5"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/2024text+code/1003-lesson3_2024.Rmd="8D468763"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/2024text+code/1006-lesson6_2024.Rmd="E0F05A2E"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/2024text+code/1007-lesson7_2024.Rmd="730BA70B"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/README.md="DD12EDD9"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/1001-lesson1.Rmd="BF3E64C9"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/1002-lesson2.Rmd="D721194D"
Expand All @@ -12,9 +8,6 @@
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/1008-lesson8.Rmd="1ED2D8B1"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/1009-lesson9.Rmd="734E9681"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/1012-lesson12.Rmd="02DD2AD7"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/1012-lesson12.knit.md="E745AD0C"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/1013-lesson13.Rmd="D8ABB287"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/9990-references.Rmd="DF3C64B5"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/C8M4M5X8-1003-lesson3.Rmd="D7092D77"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/R4PsyBook.md="20E0E71A"
/Users/hcp4715/Library/CloudStorage/OneDrive-Personal/Teaching/Grad_R_course/R4PsyBook/bookdown_files/Books/Book/index.Rmd="5222C84B"
5 changes: 3 additions & 2 deletions bookdown_files/Books/Book/1007-lesson7.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
editor_options:
markdown:
editor_options:
markdown:
wrap: 72
output: pdf_document
---

# 第七讲:如何进行基本的数据分析: *t*-test和ANOVA{#lesson-7}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions bookdown_files/Books/Book/_book/1006-lesson6.md

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions bookdown_files/Books/Book/_book/1007-lesson7.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
editor_options:
markdown:
editor_options:
markdown:
wrap: 72
output: pdf_document
---

# 第七讲:如何进行基本的数据分析: *t*-test和ANOVA{#lesson-7}
Expand Down Expand Up @@ -268,8 +269,8 @@ DT::datatable(head(df.match.raw, 10),
```

```{=html}
<div class="datatables html-widget html-fill-item-overflow-hidden html-fill-item" id="htmlwidget-cacf7d4dcb035c8c9b4f" style="width:100%;height:auto;"></div>
<script type="application/json" data-for="htmlwidget-cacf7d4dcb035c8c9b4f">{"x":{"filter":"none","vertical":false,"fillContainer":true,"data":[["1","2","3","4","5","6","7","8","9","10"],[7302,7302,7302,7302,7302,7302,7302,7302,7302,7302],["moral","immoral","immoral","immoral","moral","moral","moral","immoral","moral","immoral"],["Other","Other","Self","Self","Other","Self","Other","Self","Other","Other"],["02-May-2018_14:23:08","02-May-2018_14:23:10","02-May-2018_14:23:15","02-May-2018_14:23:17","02-May-2018_14:23:19","02-May-2018_14:23:21","02-May-2018_14:23:24","02-May-2018_14:23:26","02-May-2018_14:23:28","02-May-2018_14:23:30"],["Exp","Exp","Exp","Exp","Exp","Exp","Exp","Exp","Exp","Exp"],[22,22,22,22,22,22,22,22,22,22],["female","female","female","female","female","female","female","female","female","female"],["R","R","R","R","R","R","R","R","R","R"],[1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1],[2,3,5,6,7,8,9,10,11,12],["moralOther","immoralOther","immoralSelf","immoralSelf","moralOther","moralSelf","moralOther","immoralSelf","moralOther","immoralOther"],["mismatch","mismatch","match","match","match","match","mismatch","mismatch","mismatch","match"],["n","n","m","m","m","m","n","n","n","m"],["n","n","m","m","m","m","n","n","n","m"],["1","1","1","1","1","1","1","1","1","1"],[0.7043,0.9903,0.8207,0.7547,0.5429,0.9009,0.9550999999999999,0.6952,0.7593,0.7135]],"container":"<table class=\"display fill-container\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Sub<\/th>\n <th>Valence<\/th>\n <th>Identity<\/th>\n <th>Date<\/th>\n <th>Prac<\/th>\n <th>Age<\/th>\n <th>Sex<\/th>\n <th>Hand<\/th>\n <th>Block<\/th>\n <th>Bin<\/th>\n <th>Trial<\/th>\n <th>Label<\/th>\n <th>Match<\/th>\n <th>CorrResp<\/th>\n <th>Resp<\/th>\n <th>ACC<\/th>\n <th>RT<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"pageLength":5,"columnDefs":[{"className":"dt-right","targets":[1,6,9,10,11,17]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false,"lengthMenu":[5,10,25,50,100]}},"evals":[],"jsHooks":[]}</script>
<div class="datatables html-widget html-fill-item-overflow-hidden html-fill-item" id="htmlwidget-83fd02be4a5c2513bcab" style="width:100%;height:auto;"></div>
<script type="application/json" data-for="htmlwidget-83fd02be4a5c2513bcab">{"x":{"filter":"none","vertical":false,"fillContainer":true,"data":[["1","2","3","4","5","6","7","8","9","10"],[7302,7302,7302,7302,7302,7302,7302,7302,7302,7302],["moral","immoral","immoral","immoral","moral","moral","moral","immoral","moral","immoral"],["Other","Other","Self","Self","Other","Self","Other","Self","Other","Other"],["02-May-2018_14:23:08","02-May-2018_14:23:10","02-May-2018_14:23:15","02-May-2018_14:23:17","02-May-2018_14:23:19","02-May-2018_14:23:21","02-May-2018_14:23:24","02-May-2018_14:23:26","02-May-2018_14:23:28","02-May-2018_14:23:30"],["Exp","Exp","Exp","Exp","Exp","Exp","Exp","Exp","Exp","Exp"],[22,22,22,22,22,22,22,22,22,22],["female","female","female","female","female","female","female","female","female","female"],["R","R","R","R","R","R","R","R","R","R"],[1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1],[2,3,5,6,7,8,9,10,11,12],["moralOther","immoralOther","immoralSelf","immoralSelf","moralOther","moralSelf","moralOther","immoralSelf","moralOther","immoralOther"],["mismatch","mismatch","match","match","match","match","mismatch","mismatch","mismatch","match"],["n","n","m","m","m","m","n","n","n","m"],["n","n","m","m","m","m","n","n","n","m"],["1","1","1","1","1","1","1","1","1","1"],[0.7043,0.9903,0.8207,0.7547,0.5429,0.9009,0.9550999999999999,0.6952,0.7593,0.7135]],"container":"<table class=\"display fill-container\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Sub<\/th>\n <th>Valence<\/th>\n <th>Identity<\/th>\n <th>Date<\/th>\n <th>Prac<\/th>\n <th>Age<\/th>\n <th>Sex<\/th>\n <th>Hand<\/th>\n <th>Block<\/th>\n <th>Bin<\/th>\n <th>Trial<\/th>\n <th>Label<\/th>\n <th>Match<\/th>\n <th>CorrResp<\/th>\n <th>Resp<\/th>\n <th>ACC<\/th>\n <th>RT<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"pageLength":5,"columnDefs":[{"className":"dt-right","targets":[1,6,9,10,11,17]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false,"lengthMenu":[5,10,25,50,100]}},"evals":[],"jsHooks":[]}</script>
```
在数据清理时,可以先读取数据,然后进行管道操作,将Shape列分割成Valence和Identity两列,并选择Base、Valence、Identity和Everything列。然后进行数据清理,只选择反应正确的反应时间,并去掉缺失值和极端反应时间。我们使用了三个标准差的方法来去除极端值。我们将反应时间转换为数值型,将情感和身份转换为因子型。我们将所有操作应用于数据框df.match,这是经过预处理的数据。

Expand Down
4 changes: 2 additions & 2 deletions bookdown_files/Books/Book/_book/1008-lesson8.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ df.pg.corr <- df.pg.raw %>%
使用head查看一下前五行

```{=html}
<div class="datatables html-widget html-fill-item-overflow-hidden html-fill-item" id="htmlwidget-ecd177a32fbdf79366db" style="width:100%;height:auto;"></div>
<script type="application/json" data-for="htmlwidget-ecd177a32fbdf79366db">{"x":{"filter":"none","vertical":false,"fillContainer":true,"data":[["1","2","3","4","5"],[1,1,1,2,1],[2.938461538461539,2.964102564102564,3.425641025641025,3.123076923076924,3.502564102564103],[3,2.384615384615385,2.384615384615385,3.461538461538462,2.461538461538462]],"container":"<table class=\"display fill-container\">\n <thead>\n <tr>\n <th> <\/th>\n <th>sex<\/th>\n <th>stress_mean<\/th>\n <th>scontrol_mean<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"pageLength":5,"columnDefs":[{"className":"dt-right","targets":[1,2,3]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false,"lengthMenu":[5,10,25,50,100]}},"evals":[],"jsHooks":[]}</script>
<div class="datatables html-widget html-fill-item-overflow-hidden html-fill-item" id="htmlwidget-345c5df54c05bf5c067c" style="width:100%;height:auto;"></div>
<script type="application/json" data-for="htmlwidget-345c5df54c05bf5c067c">{"x":{"filter":"none","vertical":false,"fillContainer":true,"data":[["1","2","3","4","5"],[1,1,1,2,1],[2.938461538461539,2.964102564102564,3.425641025641025,3.123076923076924,3.502564102564103],[3,2.384615384615385,2.384615384615385,3.461538461538462,2.461538461538462]],"container":"<table class=\"display fill-container\">\n <thead>\n <tr>\n <th> <\/th>\n <th>sex<\/th>\n <th>stress_mean<\/th>\n <th>scontrol_mean<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"pageLength":5,"columnDefs":[{"className":"dt-right","targets":[1,2,3]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false,"lengthMenu":[5,10,25,50,100]}},"evals":[],"jsHooks":[]}</script>
```


Expand Down
Loading

0 comments on commit 7a9d1e5

Please sign in to comment.