Get the list of installed packages by user in R

How we can get the list of installed packages by user in R along with its version? I know about the command installed.packages() which will give information about all packages (base or non-base). But how we can get those installed by user to have something like this: For all user installed packages (i.e. those package … Read more

r function unzip error 1 in extracting from zip file

Environment: Windows 7 OS RStudio Version 0.99.491 I have been programming in R for about 4 months via the Coursera Data Science curriculum, but I have NEVER been successful in using the unzip function. I’ve looked at the forums for hours for potential solutions, syntax problems, undefined arguments, etc., but to no avail. I eventually … Read more

What does is.na() applied to non-(list or vector) of type ‘NULL’ mean?

The problem in this specific case The right hand side of your formula is 1, which makes it a null model. coxph calls coxph.fit, which (perhaps lazily) doesn’t bother to return coefficients for null models. Later coxph calls extractAIC, which erroneously assumes that the model object contains an element named coefficients. The general case is.na … Read more

How to counter the ‘non-numeric matrix extent’ error in R?

As Roland pointed out, one problem is, that col doesn’t seem to be numeric. Please check if means is a dataframe or matrix, e.g. str(means). If it is, your code should not result in the error: ‘non-numeric matrix extent’. You also have some other issues in your code. I created a simplified example and pointed … Read more

Error: isTRUE(gpclibPermitStatus()) is not TRUE

You can look at Hadley’s master file for ggplot2/R/fortify-spatial.r. Based on this outside link, my understanding is that lines 31–34 (in it’s current form) used to read something like So back then one way to attack the problem was to turn on the license As @rcs, @Edzer Pebesma, and this answer mention, rgeos should resolve the issue for more recent installations.

Getting the IP address of the current machine using Java

This way works well when there are multiple network interfaces. It always returns the preferred outbound IP. The destination 8.8.8.8 is not needed to be reachable. Connect on a UDP socket has the following effect: it sets the destination for Send/Recv, discards all packets from other addresses, and – which is what we use – transfers the socket … Read more

Suppress output of a function

It isn’t clear why you want to do this without sink, but you can wrap any commands in the invisible() function and it will suppress the output. For instance: Otherwise, you can always combine things into one line with a semicolon and parentheses: