분류 전체보기
-
R 기초 1 - R에서의 data typeR 2022. 10. 23. 16:18
카페 참조 Daum 카페 cafe.daum.net 통계학에서 자료측정의 수준(척도) 크게 범주형(정성적)은 데이터 자료가 문자열로 나타난다. 크게 수치형(정량적)은 데이터 자료가 숫자열로 나타난다. R의 타입은 무조건 배열이다. 1. Vector : 1차원 배열 형태의 자료구조 (동일한 형태의 자료만 저장됨) 2. Matrices(Matrix) : 2차원의 dataset 이다. 이는 매트릭스 함수에 벡터를 제공함으로써 만들 수 있다. 동일 데이터 타입을 갖는 2차원 배열(행렬 구조). 3. Arrays : matrix는 2차원에 한정되지만 arrays는 어떠한 차원으로도 만들 수 있다. 동일 데이터 타입을 갖는 다차원 배열. (활용도는 다소 낮다) 4. List : 서로 다른 타입의 데이터를 기억할 수 ..
-
R 설치 및 초기설정, 프로젝트 생성R 2022. 10. 23. 16:13
The Comprehensive R Archive Network cran.seoul.go.kr RStudio를 다운 받기 전에 R을 다운받아야 된다. 위에 경로에서 다운 받을 수 있다. Download the RStudio IDE RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, and a variety of robust tools for plotting, viewing history, debugging and managing www.rstudio.c..
-
git 설시 및 기본 명령어git 2022. 10. 23. 16:03
Git git-scm.com 위의 경로로 들어가서 다운받는다. git 초기 설치 후 git.exe를 명령 프롬포트에 입력하여 잘 설치되었는지 확인할 수 있다. 기초 명령어 git init (git으로 관리하겠다는 선언부! 맨 처음 할 것) '깃 저장소'라고 부름 git status (현재 상태 확인) git add index.html (현재 파일 올리기) git add . (모든 파일 올리기) git commit -m "index.html added(이름)" (현재 상태 저장하기) git reflog (지금까지의 commit 이력 확인) git log (지금까지 저장한 것 목록보기) git reset --hard HEAD~(~횟수만큼 몇 번 뒤로갈지 표시) (뒤에 저장했던 곳으로 돌아가기)
-
11 ~ 20번java codingtest 2022. 10. 23. 16:00
11번 사분면 고르기 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a=scan.nextInt(); int b=scan.nextInt(); if (a > 0 && b > 0) { System.out.println("1"); }else if (a 0){ System.out.println("2"); }else if (a 0 && b < 0){ System.out.println("4"); } } } 12번 알람시..
-
1~10번java codingtest 2022. 10. 23. 15:58
1번 두 자연수 A와 B가 주어진다. 이때, A+B, A-B, A*B, A/B(몫), A%B(나머지)를 출력하는 프로그램을 작성하시오. import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a=scan.nextInt(); int b=scan.nextInt(); System.out.println(a+b); System.out.println(a-b); System.out.println(a*b); System.out.println(a/b); System.out.println(a%b); } } 2번 첫째 줄에 준하의 놀람을 출력한다. ..
-
Python Ajax 예제(db 연동)Python Django 2022. 10. 23. 15:55
cmd에서 명령어 입력 후, 원래 있던 테이블을 가져와서 models.py에 붙여놓기 한다. models.py from django.db import models # Create your models here. class Sangdata(models.Model): code = models.IntegerField(primary_key=True) sang = models.CharField(max_length=20, blank=True, null=True) su = models.IntegerField(blank=True, null=True) dan = models.IntegerField(blank=True, null=True) class Meta: managed = False db_table = 'sangda..
-
Python Django 18 - Python AjaxPython Django 2022. 10. 23. 15:43
urls.py from django.contrib import admin from django.urls import path from myapp import views urlpatterns = [ path("admin/", admin.site.urls), path("", views.indexFunc), path("startajax", views.Func1), path("goajax", views.Func2), ] views.py from django.shortcuts import render import time import json from django.http.response import HttpResponse # Create your views here. lan = { 'id' : 123, 'nam..