Skip to content

Instantly share code, notes, and snippets.

#
# ex 4-1
#
a <- list(1, "abc", FALSE)
mode(a[[2]])
typeof(a[[2]])
#
# ex 4-2
@thatseeyou
thatseeyou / ex3-1.R
Last active March 7, 2016 06:02
R matrix exercise
#
# ex3-1.R
#
# matrix exercise
#
Q <- matrix(c(50,60,80,100,150,200,30,40,70), nrow=3)
colnames(Q) <- c("5Kg", "10Kg", "15Kg")
rownames(Q) <- c("Shop A", "Shop B", "Shop C")
P <- matrix(c(10.60, 17.20, 22.50))
@thatseeyou
thatseeyou / zerosum.c
Last active March 18, 2016 09:42
4개의 숫자합이 0이 되는 조합의 개수 찾기
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
/*
gcc zerosum.c -o zerosum -ansi -fno-asm -O2 -Wall -lm
*/
void printBuf(int *buf, int num)
{
#!/bin/bash
#
# 편의상 자동으로 child.sh을 만든다.
#
cat <<'EOF' > child.sh
#!/bin/bash
echo $(plus_fun $(($1 * $2)) )
EOF
chmod +x child.sh