1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rcpp:: Named と _[

Posted at

Named と _[ が同じなのは
分かっているんだが,マニュアルというか
ビネットには記されていないような


# include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
List test (){
  return List::create(_["first"]= "ABC",_["second"]= 3.14,
   		      _["third"]= 3L)
  // return List::create( Named ("first") = "ABC", Named("second") = 3.14,
  // 					   Named("third")= 3L); 
   
}
/*** R
  test ()
*/

Rcpp-quickref.pdf のコード内に
コメントとして // short for Named とあった.

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?