answer <- sales |> keep(region == "West") |> take(2)
class(answer)[1] "god_pipeline"
A verb does not return a table. It returns a pipeline, which is a plan for one.
answer <- sales |> keep(region == "West") |> take(2)
class(answer)[1] "god_pipeline"
answer = sales >> keep(col.region == "West") >> take(2)
type(answer).__name__'Pipeline'
Printing it runs it, which is why every example so far shows a table. When you want the table itself, ask for it with collect.
nrow(collect(answer))[1] 2
len(collect(answer))2
In R this matters for more than speed. sort and keep are names other packages use too, and a pipeline handed to the wrong sort has no meaning there, so it stops instead of returning a plausible answer.
You can also see what the verbs wrote, which is the text form, and it is the same sentence in both languages.
cat(format(sales |> keep(region == "West") |> take(10)))sales
then keep where ([region] is "West")
then take 10
print((sales >> keep(col.region == "West") >> take(10)).written())sales
then keep where ([region] is "West")
then take 10