CommencerCommencer gratuitement

How many cores does this machine have?

The parallel package has a function detectCores() that determines the number of cores in a machine.

How many cores does this machine have?

Cet exercice fait partie du cours

Writing Efficient R Code

Afficher le cours

Instructions

  • Load the parallel package.
  • Using the detectCores() function, store the number of cores in an object called no_of_cores.
  • Print no_of_cores.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Load the parallel package
___

# Store the number of cores in the object no_of_cores
no_of_cores <- ___

# Print no_of_cores
___
Modifier et exécuter le code