이 컴퓨터에는 코어가 몇 개 있나요?
parallel 패키지에는 머신의 코어 수를 확인하는 함수 detectCores() 가 있습니다.
이 컴퓨터에는 코어가 몇 개 있나요?
이 연습은 강의의 일부입니다
효율적인 R 코드 작성
연습 안내
parallel패키지를 불러오세요.detectCores()함수를 사용해 코어 수를no_of_cores라는 객체에 저장하세요.no_of_cores를 출력하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Load the parallel package
___
# Store the number of cores in the object no_of_cores
no_of_cores <- ___
# Print no_of_cores
___