3 ms·
I don’t think R is conflating vectors and scalars. It straight up doesn’t let you access scalars. Hot take: if you are programming in R you are probably using
by wodenokoto 2y ago
I don’t think R is conflating vectors and scalars. It straight up doesn’t let you access scalars.
Hot take: if you are programming in R you are probably using the wrong tool. If you are analyzing, munging, modeling, visualizing data or fitting/training models, you are probably using the right tool.
- wdkrnls 2y agoSpeak for yourself. Programming in R is amazingly expressive for prototyping. Its semantics are extremely lispy, yet it provides excellent support for fast numerics. It keeps me focusing on the problems I want to solve and provides me the tools to abstract them quickly to handle related problems. Meanwhile, python keeps forcing me to care about pesky implementation details which I don't care about on a first or even second or third pass. I really can't understand people who like python over R. Did you guys not read SICP?
- wodenokoto 2y ago> I really can't understand people who like python over R. Did you guys not read SICP? I didn't. I do wonder what you are programming in R, that isn't loading, munging visualizing and fitting models. Do you have a github you can share? Or a SICP with examples in R?
- tfehring 2y agoIf you parse e.g. a json file containing a scalar to an R object, that scalar will be represented as a length-1 vector. I get what you’re saying, but “it doesn’t let you access scalars” would suggest to me that it can’t parse or represent values that are defined elsewhere as scalars at all.
- wodenokoto 2y agoBut the scalar is converted to a vector. And of the top of my head I have no idea how the round trip will end up. Will it spit out a 1 length vector in the json file or a scalar? And which ever you get, how would you do the opposite?