Training on Educational Research and Statistical Analysis for Teachers - Sessions 8–9 R Practice

힘센캥거루
2025년 12월 27일(수정됨)
1
24

This part was hands-on practice with R.

We tried out simple calculations and using libraries.

For example, let’s say we have the following Python code.

def add(a, b):
	return a + b
x = 1
y = 2
sum(x, y)

If we convert this to R, it looks like this.

add <- function(a, b){
	return a + b
}
x <- 1
y <- 2
sum(x, y)

And the basic data types are as follows.

Data type

Example

Description

Numeric

x <- 10

double by default

Character

name <- "R"

Strings use quotation marks

Logical

flag <- TRUE

TRUE / FALSE

Vector

v <- c(1,2,3)

Basic data structure in R

List

lst <- list(a=1, b="hi")

Can contain different types

Data frame

df <- data.frame(x=1:3, y=c("a","b","c"))

Table-like form

Instead of lists, you use the vector type, and you can perform operations on all of its values at once.

x <- c(1,2,3)
x + 1     # [1] 2 3 4
x * 2     # [1] 2 4 6
x == 2    # [1] FALSE TRUE FALSE

At one point we loaded csv and sav files, and I was surprised that the function names were very similar to those in pandas.

That made me wonder if it wouldn’t be fine to just analyze everything with Python instead of using R, but according to ChatGPT it’s still good to learn R.

Training on Educational Research and Statistical Analysis for Teachers - Sessions 8–9 R Practice-1

I feel like once I do one proper data analysis project, I’ll get the hang of it.

관련 글

대교협 대입상담프로그램에 일부 교사가 접속이 안될 때 해결방법
대교협 대입상담프로그램에 일부 교사가 접속이 안될 때 해결방법
어느 날 부터 선생님 몇 분이 대교협 대입상담프로그램에 접속이 안되는 현상이 발생했다.문제는 다른 사람들은 다 문제없이 접속되는데, 딱 두 사람만 접속이 안되는 것.원인을 찾을 수 없어 2시간을 헤메다가 겨우 알게 되었다.1. 접속불가 증상먼저 터미널을 켜서 핑을 확인...
When the mock exam summary sheet won’t upload to Kcue, Univ, or Kim Young-il – Save as PDF
When the mock exam summary sheet won’t upload to Kcue, Univ, or Kim Young-il – Save as PDF
After taking a mock exam, you can print your score report from the Korea Institute for Curriculum and Evaluation either as a hard copy or in PDF forma...
How to Operate a Robot Vacuum Cleaner in the Classroom
How to Operate a Robot Vacuum Cleaner in the Classroom
It’s already been four years since I started using a robot vacuum cleaner in my classroom.This year, my goal is to have the students take full respons...
Automating School Work – Automating Draft Assessment Plans with Spreadsheets
Automating School Work – Automating Draft Assessment Plans with Spreadsheets
With the 2022 revised curriculum, the number of subjects has increased, and as a result we now have to rewrite the assessment plan every semester.The...
Review of Offline Participation in the 2026 Dongguk University Future Society Teacher Competency Enhancement Forum
Review of Offline Participation in the 2026 Dongguk University Future Society Teacher Competency Enhancement Forum
One of the teachers introduced a training program that looked interesting.It was AI-related training held at Dongguk University.AI training is nice, b...
Automating School Work – Using AI to Check Subject-Specific Remarks in Student Records
Automating School Work – Using AI to Check Subject-Specific Remarks in Student Records
If I had to pick the most meaningless, exhausting, and boring task at school, I would choose checking student records.In middle school, the student re...

댓글을 불러오는 중...