Rcpp is ready
Romain François
@romain_francois
jeudi 11 juillet 13
Rcpp is ready
Romain François
@romain_francois
jeudi 11 juillet 13
0.10.4
jeudi 11 juillet 13
Texte
acer, ALKr, Amelia, apcluster, BayesComm, bcp, bfa, bfp, bifactorial,
blockcluster, ccaPP, cda, cladoRcpp, classify,...
Texte
highfrequency, highr, highriskzone, HilbertVis, HilbertVisGUI, HiPLARM, hiPOD, hisemi, HistData, HiTC, HiveR, HLMdia...
#include <Rcpp.h>
// [[Rcpp::export]]
int add( int a, int b){
return a + b ;
}
> sourceCpp( "add.cpp" )
> add( 1, 2 )
[1] ...
cppFunction( '
int add( int a, int b){
return a + b ;
}' )
add( 1, 2 )
# [1] 3
cppFunction
jeudi 11 juillet 13
C++ Classes
class Account {
private:
double balance ;
public:
Account( ) : balance(0){}
double get_balance(){
return balan...
rcpp.org
gallery.rcpp.org
jeudi 11 juillet 13
Challenge :
API
Documentation
jeudi 11 juillet 13
jeudi 11 juillet 13
jeudi 11 juillet 13
jeudi 11 juillet 13
RStudio
devtools
jeudi 11 juillet 13
romain@r-enthusiasts.com
@romain_francois
Questions
jeudi 11 juillet 13
Upcoming SlideShare
Loading in …5
×

Rcpp is-ready

1,431 views
1,260 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,431
On SlideShare
0
From Embeds
0
Number of Embeds
32
Actions
Shares
0
Downloads
20
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Rcpp is-ready

  1. 1. Rcpp is ready Romain François @romain_francois jeudi 11 juillet 13
  2. 2. Rcpp is ready Romain François @romain_francois jeudi 11 juillet 13
  3. 3. 0.10.4 jeudi 11 juillet 13
  4. 4. Texte acer, ALKr, Amelia, apcluster, BayesComm, bcp, bfa, bfp, bifactorial, blockcluster, ccaPP, cda, cladoRcpp, classify, climdex.pcic, clogitL1, clusteval, ConConPiWiFun, cxxfunplus, ddgraph, Delaporte, DESeq2, devtools, diversitree, ecp, EpiContactTrace, ExactNumCI, fastGHQuad, FastPCS, FBFsearch, fdaMixed, flowWorkspace, forecast, fugeR, geiger, GeneNetworkBuilder, GeneticTools, gMWT, GOSemSim, GOsummaries, gRbase, GRENITS, gRim, growcurves, GSE, GUTS, HLMdiag, httpuv, hyperSpec, inline, jaatha, KernSmoothIRT, Kmisc, knitr, LaF, marked, maxent, mets, minqa, mirt, miscF, mosaics, MPTinR, msgl, multmod, mvabund, MVB, mzR, NetworkAnalysis, ngspatial, oem, openair, orQA, pcaMethods, phom, phylobase, planar, PReMiuM, psgp, quadrupen, RcppArmadillo, RcppBDT, rcppbugs, RcppClassic, RcppClassicExamples, RcppCNPy, RcppDE, RcppEigen, RcppExamples, RcppGSL, RcppOctave, RcppProgress, RcppRoll, RcppSMC, RcppXts, Rdisop, rexpokit, rforensicbatwing, rgam, RInside, Risa, Rmalschains, RMessenger, rmgarch, Rmixmod, robustgam, robustHD, rococo, RProtoBuf, RQuantLib, RSNNS, RSofia, rTANDEM, rugarch, RVowpalWabbit, SBSA, sdcMicro, sdcTable, sequences, simFrame, sirt, spacodiR, sparseHessianFD, sparseLTSEigen, SpatialTools, stochvol, stream, surveillance, survSNP, tagcloud, TAM, tbart, termstrc, tmg, transmission, transnet, trustOptim, unmarked, VIM, waffect, WideLM, wordcloud, zic 143 jeudi 11 juillet 13
  5. 5. Texte highfrequency, highr, highriskzone, HilbertVis, HilbertVisGUI, HiPLARM, hiPOD, hisemi, HistData, HiTC, HiveR, HLMdiag, hlr, hmeasure, Hmisc, HMMcopy, hmmm, HMP, HMPTrees, hof, homals, hopach, hotspots, hpar, HPbayes, HPO.db, HPOSim, HSAUR, HSAUR2, hSDM, HSROC, HTMLUtils, HTqPCR, hts, HTSanalyzeR, HTSeqGenie, htSeqTools, HTSFilter, httpuv, httr, huge, HumMeth27QCReport, HWEBayes, hwriterPlus, hybridHclust, HybridMC, HybridMTest, hydroGOF, HydroMe, hydroPSO, hydroTSM, HyperbolicDist, hyperdirichlet, hyperdraw, hypergeo, hypergraph, hyperSpec, HyPhy, hzar, iBBiG, ibd, IBDsim, IBHM, iBMQ, ibr, IBrokers, iBUGS, ic.infer, icaOcularCorrection, ICE, ICEinfer, iChip, iCluster, ICS, ICSNP, idiogram, IdMappingAnalysis, IdMappingRetrieval, IDPmisc, iFad, iFlow, ifultools, iGasso, IgorR, igraph, igraph0, igraphdata, igraphtosonia, illuminaio, IM, imageHTS, imguR, ImpactIV, imprProbEst, imputation, imputeYn, indicspecies, inference, influence.ME, infoDecompuTE, informR, infutil, inline, insideRODE, inSilicoDb, inSilicoMerging, insol, installr, intamap, intamapInteractive, InteractiveIGraph, intergraph, Interpol.T, interval, intReg, introgress, intsvy, inveRsion, iPAC, ipdmeta, iplots, IPMpack, IPPD, ipred, IPSUR, ipw, IQCC, IRanges, iRefR, iRegression, irlba, irtoys, irtProb, irtrees, isa2, isdals, ISIPTA, ISLR, ismev, isobar, isocir, IsoGene, IsoGeneGUI, isopam, IsotopeR, ISOweek, iSubpathwayMiner, isva, ISwR, ITALICS, iteRates, iterativeBMA, iterativeBMAsurv, iterators, itertools, itree, its, IUPS, ivivc, iWebPlots, iWeigReg, jaatha, jackknifeKME, JADE, JGL, JGR, JJcorr, JM, JMbayes, jmec, Jmisc, jmosaics, joda, joineR, JointRegBC, JOP, JoSAE, kaps, KCsmart, kdetrees, KEGGgraph, keggorthology, KEGGprofile, KEGGREST, KEGGSOAP, kelvin, Kendall, kerdiest, kernelFactory, KernSmooth, KernSmoothIRT, kinship2, kitagawa, kknn, klaR, klausuR, klin, Kmisc, kml, kml3d, knitcitations, knitr, knitrBootstrap, knnGarden, knorm, kobe, kohonen, KoNLP, koRpus, KrigInv, ks, KsPlot, kst, ktspair, kulife, kzs, l2boost, labdsv, laeken, LaF, Lahman, LambertW, landsat, languageR, lapmix, LargeRegression, latdiag, latentnet, Laterality, lattice, latticeDensity, latticeExtra, LatticeKrig, latticist, lava, lava.tobit, lavaan, lavaan.survey, lawstat, lazyData, lazyWeave, lbiassurv, LCAextend, lcd, lcda, lcmr, lda, ldbounds, LDcorSV, ldDesign, LDheatmap, ldlasso, LDOD, ldr, LEAPFrOG, leapp, LearnEDA, les, lessR, lestat, lfe, lfstat, lga, lgcp, libamtrack, LICORS, LICurvature, lifecontingencies, LIHNPSD, likelihood, LIM, limma, limmaGUI, limSolve, LinearizedSVR, lineup, linkcomm, lint, LiquidAssociation, liso, list, llama, lle, lmbc, lmdme, lme4, lmeNB, lmeNBBayes, LMERConvenienceFunctions, lmerTest, lmeSplines, LMest, LMGene, lmmfit, lmmlasso, lmSupport, lmtest, localdepth, localgauss, locfit, log4r, LogConcDEAD, logconcens, logcondens, logcondens.mode, logcondiscr, LogicForest, logicFS, logistf, logitT, logmult, lokern, lol, longitudinalData, longmemo, longpower, longRPart, loop, LoopAnalyst, lordif, lossDev, LPCM, lpNet, lqmm, LS2W, lsa, LSC, LSD, lsmeans, lspls, lss, ltm, ltmle, ltsk, lubridate, luca, lumi, LVMMCOR, LVSmiRNA, M3, maanova, MAc, macat, MAclinical, maCorrPlot, MAd, mada, maDB, made4, Maeswrap, magnets, maigesPack, MAINT.Data, makecdfenv, makeR, MALDIquant, MALDIquantForeign, MAMA, Mangrove, manta, MapGAM, MAPLES, mapplots, maptools, maptree, mAr, MAR1, mar1s, marginalmodelplots, marginTree, markdown, marked, maRketSim, marmap, marray, MARSS, maSigPro, maskBAD, MASS, MassSpecWavelet, MasterBayes, MAT, Matching, MatchIt, maticce, matie, Matrix, MatrixModels, MAVTgsa, maxent, maxLik, maxlike, MBA, MBESS, MBmca, mbmdr, mboost, mBPCR, mc2d, mcaGUI, mcgibbsit, mchof, mcll, mclogit, MCMCglmm, MCMChybridGP, MCMCpack, mcmcplots, Mcomp, MCPAN, McParre, MCPerm, MCPMod, mcprofile, MCRestimate, mcsm, McSpatial, mda, MDM, MDPtoolbox, mdqc, MDR, MDSGUI, meboot, mederrRank, mediation, MEDIPS, MEDME, MEET, mefa, mefa4, meifly, melody, mem, memisc, MEMSS, MergeGUI, MergeMaid, MESS, meta, metaArray, MetabolAnalyze, metabolomics, metacom, Metadata, MetaDE, metafor, metagen, metagenomeSeq, metahdep, metaMA, metamisc, MetaPath, MetaPCA, MetaQC, meteogRam, Meth27QC, MethComp, methVisual, methyAnalysis, MethylSeekR, methylumi, metRology, metrumrg, mets, MEWMA, mFilter, mfr, Mfuzz, mgcv, mgpd, mgraph, mgsa, MHadaptive, mht, mhurdle, mi, mice, micEcon, micEconAids, micEconCES, micEconSNQP, MiChip, MiClip, microbenchmark, micromap, microRNA, MIfuns, MigClim, migui, MineICA, minfi, MinimumDistance, minPtest, minqa, miP, MIPHENO, MiPP, MiRaGE, mirt, miRtest, misc3d, miscF, miscFuncs, MiscPsycho, miscTools, missForest, MissingDataGUI, missMDA, MissMech, MitISEM, mixAK, mixcat, mixedQF, mixexp, mixlow, MixMAP, mixOmics, mixPHM, mixsep, MixSim, mixstock, mixtools, mkin, MKmisc, mlbench, mlDNA, MLDS, mlearning, mleur, mlgt, MLInterfaces, mlmRev, mlogit, mlogitBMA, MLP, MLPAstats, MM, MMDiff, mmeta, mmm, mmm2, mmod, MmPalateMiRNA, MNM, MNP, mobForest, Mobilize, MOCCA, Modalclust, modeest, modelcf, ModelGood, ModelMap, modiscloud, modTempEff, MOJOV, mokken, mombf, Momocs, mondate, monomvn, Morpho, MortalitySmooth, mosaic, mosaics, MotifDb, motifRG, motifStack, MotIV, move, movMF, mpa, MPDiR, MplusAutomation, mpm, mpMap, mpmcorrelogram, mpoly, MPTinR, mratios, MRCV, mrdrc, mrds, mritc, mRMRe, msap, msarc, MSBVAR, MSeasy, MSeasyTkGUI, mseq, MSG, msgl, msir, msme, MSnbase, MSQC, msr, msSurv, MSwM, mtcreator, MUCflights, MuFiCokriging, mugnet, Mulcom, multcomp, multcompView, MultEq, multgee, multibiplotGUI, multic, MultiLCIRT, multilevel, multilevelPSA, multinomRob, MultiOrd, MultiPhen, multiPIM, multiscan, multisensi, multitable, multitaper, multmod, multtest, muma, MuMIn, munfold, munsell, mutoss, mutossGUI, MVA, mvabund, MVB, mvc, mvinfluence, mvmeta, mvna, mvoutlier, MVPARTwrap, MVpower, mvProbit, MVR, mzR, nacopula, nadiv, NanoStringNorm, NarrowPeaks, nbpMatching, nCal, ncdfFlow, NCIgraph, ndl, ndtv, ndvits, NeatMap, needy, neldermead, nem, NestedCohort, netClass, NetCluster, NetIndices, NetPreProc, netresponse, nets, netweavers, network, NetworkAnalysis, networkBMA, networkDynamic, networksis, networkTomography, neuralnet, nFactors, ngspatial, NHEMOtree, NHPoisson, Nippon, nlADG, nlme, nlmeODE, nlmrt, nlrwr, nls2, NlsyLinks, nlts, NMF, NMOF, NMRS, nnclust, nnet, nnNorm, nodeHarvest, NOISeq, nonparaeff, NonpModelCheck, nopp, nor1mix, NormalGamma, NormqPCR, np, nparcomp, nparLD, NPCD, NPCirc, npmlreg, NPMPM, npRmpi, NRAIA, NSA, nsprcomp, nucleR, nullabor, numConversion, nutshell, nutshell.audioscrobbler, oblique.tree, obliqueRF, oc, ocomposition, OCplus, odfWeave, odfWeave.survey, odprism, oem, OjaNP, okmesonet, oligo, oligoClasses, OLIN, OLINgui, OLScurve, oncomodel, Oncotree, oneChannelGUI, OPDOE, openair, opencpu.demo, openNLP, OpenRepGrid, OpenStreetMap, operator.tools, opm, opmdata, oposSOM, optAUC, optBiomarker, optimbase, optimsimplex, optimx, optmatch, optparse, optpart, orddom, ORDER2PARENT, orderbook, OrderedList, OrdFacReg, ordinal, ordPens, OrganismDbi, OrgMassSpecR, orientlib, orQA, orsk, OSAT, osmar, OTUbase, ouch, outbreaker, OutlierD, OutlierDC, OUwie, pa, packdep, pacose, PADOG, PAGI, PairedData, PairViz, pairwiseCI, palaeoSig, paleoMAS, paleotree, PamGeneMixed, pamm, pamr, pan, pander, PAnnBuilder, panp, PANR, PAPi, ParamHelpers, paramlink, paran, parcor, parfossil, parma, parspatstat, partDSA, partialOR, partitionMap, partitions, party, partykit, parviol, PAS, pass, pastecs, pastis, PASWR, patchPlot, pathClass, pathmox, PathNet, pathRender, pathview, pavo, PAWL, pbatR, pbdDEMO, PBImisc, pbkrtest, PBSadmb, PBSmapping, PBSmodelling, pca3d, pcaGoPromoter, pcalg, pcaMethods, pcot2, PCovR, PCpheno, pcrcoal, pcrsim, PCS, pcurve, pdc, pdfCluster, pdInfoBuilder, pdmclass, Peak2Trough, pec, pedantics, pedigree, pedigreemm, pegas, PEIP, penalized, penalizedLDA, penalizedSVM, pencopula, pendensity, penDvine, PenLNM, pensim, peperr, pequod, 3324 jeudi 11 juillet 13
  6. 6. #include <Rcpp.h> // [[Rcpp::export]] int add( int a, int b){ return a + b ; } > sourceCpp( "add.cpp" ) > add( 1, 2 ) [1] 3 sourceCpp jeudi 11 juillet 13
  7. 7. cppFunction( ' int add( int a, int b){ return a + b ; }' ) add( 1, 2 ) # [1] 3 cppFunction jeudi 11 juillet 13
  8. 8. C++ Classes class Account { private: double balance ; public: Account( ) : balance(0){} double get_balance(){ return balance ; } void withdraw(double x){ balance -= x ; } void deposit(double x ){ balance += x ; } } ; RCPP_MODULE(BankAccount){ class_<Account>( "Account" ) .constructor() .property( "balance", Account::get_balance ) .method( "deposit", Account::deposit) .method( "withdraw", Account::withdraw) ; } account <- new( Account ) account$deposit( 1000 ) account$balance account$withdraw( 200 ) account$balance jeudi 11 juillet 13
  9. 9. rcpp.org gallery.rcpp.org jeudi 11 juillet 13
  10. 10. Challenge : API Documentation jeudi 11 juillet 13
  11. 11. jeudi 11 juillet 13
  12. 12. jeudi 11 juillet 13
  13. 13. jeudi 11 juillet 13
  14. 14. RStudio devtools jeudi 11 juillet 13
  15. 15. romain@r-enthusiasts.com @romain_francois Questions jeudi 11 juillet 13

×