In R formulas, why do I have to use the I() function on power terms, like y ~ I(x^3)

The tilde operator is actually a function that returns an unevaluated expression, a type of language object. The expression then gets interpreted by modeling functions in a manner that is different than the interpretation of operators operating on numeric objects. The issue here is how formulas and specifically the “+, “:”, and “^” operators in them are … Read more

Categories r

Recommendation for C# Matrix Library

Math.NET Numerics is very nice, if it supports the operations you want. The older Math.Net Iridium still supports more options. Also, dnAnalytics is quite nice, but no longer being developed. (It, as well as Iridium, are being merged into Math.NET Numerics.) On the commercial side, there are some very good, robust options. The Extreme Optimization Numerical Libraries work very well. … Read more

What’s the @ in front of a string in C#?

It marks the string as a verbatim string literal – anything in the string that would normally be interpreted as an escape sequence is ignored. So “C:\\Users\\Rich” is the same as @”C:\Users\Rich” There is one exception: an escape sequence is needed for the double quote. To escape a double quote, you need to put two double quotes in a row. For instance, @”””” evaluates … Read more