R object identification

前端 未结 4 910
梦如初夏
梦如初夏 2020-12-04 05:10

I am often ending up with a function producing output for which I don\'t understand the output data type. I\'m expecting a list and it ends up being a list of lists or a dat

4条回答
  •  我在风中等你
    2020-12-04 05:34

    If I get 'someObject', say via

    someObject <- myMagicFunction(...)
    

    then I usually proceed by

    class(someObject)
    str(someObject)
    

    which can be followed by head(), summary(), print(), ... depending on the class you have.

提交回复
热议问题