Skip to content

Commit 463ea32

Browse files
authored
Update DataFrame.h
Simplified
1 parent ffc9ed1 commit 463ea32

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

inst/include/Rcpp/DataFrame.h

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,12 @@ namespace Rcpp{
8383
return LENGTH(rn);
8484
}
8585

86-
// Leave in place for a year
87-
// before making defunct
88-
inline int nrows() const {
89-
return DataFrame_Impl::nrow();
90-
}
91-
92-
// Adds size attribute accessors that mimic
93-
// those available in R and the Matrix class
94-
inline int rows() const {
95-
return DataFrame_Impl::nrow();
96-
}
86+
// Offer multiple variants to accomodate both old interface here and signatures in other classes
87+
inline int nrows() const { return DataFrame_Impl::nrow(); }
88+
inline int rows() const { return DataFrame_Impl::nrow(); }
9789

98-
inline int ncol() const {
99-
return DataFrame_Impl::length();
100-
}
101-
102-
inline int cols() const {
103-
return DataFrame_Impl::length();
104-
}
90+
inline int ncol() const { return DataFrame_Impl::length(); }
91+
inline int cols() const { return DataFrame_Impl::length(); }
10592

10693
static DataFrame_Impl create(){
10794
return DataFrame_Impl() ;

0 commit comments

Comments
 (0)