Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 5836

Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.

1 vote

Do I always need to "require" a package before using any function from it?

You not only need to install a package, but you need to load it for a particular script. That's what require('rJSON') is doing. Similarly, you could use library(rJSON) at the beginning for similar ef …
Fomite's user avatar
  • 23.7k
2 votes
Accepted

How should I interpret the exp(coef) hazard ratio in Cox regression?

For a single binary exposure like what you are describing, which one R returns doesn't really change things. …
Fomite's user avatar
  • 23.7k
1 vote

What distribution would lead to this highly peaked and skewed density plot?

Assuming, as others have, that the small blip below zero is an artifact of a density smoothing process, rather than a small amount of negative data, your distribution looks like an exponential distrib …
Fomite's user avatar
  • 23.7k
1 vote

Generation of distribution with given mean, standard deviation, lower and upper bounds

Sadly this won't do you much good in R, but since I think it's faintly on topic for the general question, this link on my blog: http://confounding.net/2010/12/01/randomly-generating-a-truncated-normal-distribution …
Fomite's user avatar
  • 23.7k
7 votes

Way to get started with and learn R?

As mentioned above, there's "R for SAS Users", and you might also want to consider looking at the "SAS and R" blog: http://sas-and-r.blogspot.com/ and the accompanying book, which provides worked examples … in both SAS and R. …
1 vote

Plotting ECDF (empirical cumulative distribution frequencies) with R

To be blunt, the plot you posted looks correct to me. Your data set hasn't been "reduced" to 25 variables - you only have values of the data up that far (technically only up to 23, but whose counting? …
Fomite's user avatar
  • 23.7k
43 votes

R vs SAS, why is SAS preferred by private companies?

Beyond that, SAS is supported by a massive infrastructure of books - the use R! series is helping this in R, but it's not quite there yet. … If R is broken you call....? …
Fomite's user avatar
  • 23.7k
1 vote
Accepted

What does "units" mean in epiR package?

One can find the answer to this by digging into some of the examples: A study was conducted by Feychting et al (1998) comparing cancer occurrence among the blind with occurrence among those who …
Fomite's user avatar
  • 23.7k
7 votes

How much RAM is needed for simulation studies using R?

R keeps all its data in memory, which means as you start having huge data sets - or large collections of data sets - you're going to top out your RAM. … If you're running out of memory resources, recode your project to save these data sets to a file, clear them from R -using rm() - and then open them back up when you need them. …
Fomite's user avatar
  • 23.7k
2 votes
Accepted

Network graph with avatars as nodes

I would suggest taking a look at NetworkX in Python, to add to the tremendous list of recommendations you're getting. I've found it to be quite flexible. It expressly allows things like images to be n …
Fomite's user avatar
  • 23.7k
2 votes

How to create a dataset with conditional probability?

I'd argue your question isn't really that heavily dependent on the R language, and more appropriate here, because - to be blunt - the generation of data like this is mostly a statistical task, rather than …
Fomite's user avatar
  • 23.7k
3 votes

Incidence density sampling in R

I'm not fluent enough with R to suggest a language-specific approach for R. … It shouldn't be too hard to adapt the coding to R. http://www.nesug.org/Proceedings/nesug09/ph/ph12.pdf …
Fomite's user avatar
  • 23.7k
1 vote

How to calculate centrality measures in a 4 million edge network using R?

There are several R software packages one could use, including "sna" and "network". One thing I wouldn't necessarily rely on if you're having performance issues with sna is NetworkX. …
Fomite's user avatar
  • 23.7k
2 votes

Plotting interval censored follow-up time as a line chart

Well, that was...fairly easy. Inspired by an unrelated graph in Visualize This: plot(data$t2, type="h", col="grey", lwd=2, xlab="Subject", ylab="Days Since Start") lines(data$t1, type="h", col="l …
Fomite's user avatar
  • 23.7k
1 vote

Predicting absolute risk using cox regression

So by "absolute risk" I'm going to assume you mean either the cumulative probability of an event at time t, or the hazard at time t. In short, no, a Cox proportional hazards model doesn't really give …
Fomite's user avatar
  • 23.7k

15 30 50 per page