How many cores used when processing 2 R sessions?

Hi, sometimes I run two R projects ("sessions") simultaneously on my Mac. The Mac has 4 cores. And the question is that, in this case, do the two projects use the same core, or do they use different cores?

Each session will use one core unless you are using a parallel computing package. If your computer has two threads per core then you will have eight cores as far as R is concerned, and one of them will be used by each session. You can check the number of effective cores your computer has by loading the "parallel" package and using the command detectCores(). You can also check the proportion of the CPU usage devoted to each R session in the Mac activity monitor.