Comece agoraComece grátis

What happens when you compile this C++ file

Read the following C++ code chunk.

#include <Rcpp.h>
using namespace Rcpp ; 

double twice(double x){
    return x + x
}

This has been saved in a file given by the variable twice_file. What will happen if you compile this file with sourceCpp()?

Este exercicio faz parte do curso

Optimizing R Code with Rcpp

Ver curso

exercicio interativo prático

Transforme teoria em prática com um dos nossos exercicio interativos

Iniciar exercicio