Skip to content

Comments

qassertm: qassert for many at once#229

Open
WillForan wants to merge 3 commits intomllg:masterfrom
WillForan:master
Open

qassertm: qassert for many at once#229
WillForan wants to merge 3 commits intomllg:masterfrom
WillForan:master

Conversation

@WillForan
Copy link

@WillForan WillForan commented Jul 22, 2022

I was looking for a way to condense

function(x,y,z){
  qassert(x='n')
  qassert(y='b')
  qassert(z='s')
}

and came up with

funtion(x,y,z) { qassertm(x='n', y='b', z='s') }

I also like it for checking specific columns of a datafame:

with(data.frame(x=1:10,y=T), qassertm(x='i', y='b'))

I'm not sure if this is generally helpful (#228) or if I missed a more idiomatic way to run multiple checks. Happy to see the request "ruthlessly closed" if fails on either front!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant