How do I write an extract method [

Viewed 57
obj <- read.fe_data("../data/grammatical_facial_expression", "b", "emphasis")

the structure of obj is 1344 observations of 4 variables. Using the extract method [ I need to write, I should get 3 obs of 4 variables after running this line.

sub_gfe_obj <- gfe_obj[1:3]

What does it mean to write an extract method [? How do I proceed? Writing an extract method doesn't mean for me to write a function right?

How do I make sure that I handle recycling, logical indexing and negative indexing in the function/

Thank you.

0 Answers
Related