139

Loosely inspired by how much people seemed to enjoy a similar question I asked on Games about unappreciated titles. But answers don't have to be media related (they still can be though).

you are viewing a single comment's thread
view the rest of the comments
[-] Hamartiogonic@sopuli.xyz 2 points 1 year ago

The best thing about R is that it was written by statisticians. The worst thing about R is that it was written by statisticians.

I guess this NULL thing would be one of those cases.

NA would not be applicable, because it’s a placeholder for a missing value. In data analysis, you tend to have have lots of NA-values, and dealing with them is super common. Every function needs to be able to handle them gracefully. For instance mean(someValues, na.rm=TRUE) would be a command for calculating the mean of a particular vector while igrnoring all NA-values. Super handy. Excel handles these missing values in a very annoying manner, but that’s a topic for another rant.

NULL can be considered an error value, but obviously it’s not very helpful because it doesn’t tell you what went wrong. Obviously, R does have all sorts of error messages, but in this case it just says NULL instead. If you find that some variable has NULL in it, you can be pretty sure something went wrong and it’s most likely due to going outside the space of a particular variable. Likewise interger(0), character(0) or logical(0) are the results you get when you’re searching for something that doesn’t exist. Not really my favorite type of error.

this post was submitted on 29 Sep 2023
139 points (97.3% liked)

Ask Lemmy

26753 readers
1385 users here now

A Fediverse community for open-ended, thought provoking questions

Please don't post about US Politics. If you need to do this, try !politicaldiscussion@lemmy.world


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS