Tagged Questions
R is a free, open source programming language and software environment for statistical computing, bioinformatics and graphics. It is advised to supplement your question with a minimal reproducible example. For statistical questions please use stats.stackexchange.com.
0
votes
0answers
3 views
Two legends fopr polar ggplot (with one custimized)
I have made polar plots as follows:
ggplot(data, aes(factor(legend.var), score, fill = factor(Indicator ) ), color='black') + geom_bar(width = 1, alpha=0.5) + scale_y_continuous() + coord_polar() + ...
1
vote
0answers
5 views
Displaying degrees of freedom in stargazer table
When constructing documents with Sweave and R, I make use of the stargazer library for tables.
When using stargazer, is there a mechanism to display the degrees of freedom associated with the ...
1
vote
0answers
14 views
Getting data from python to R: rpy2 import pandas.rpy.common error
I am learning python and am just getting into pandas. I am already familiar with R. I would like to be able to create a data frame in python and then somehow get it into R.
Could I do this ...
0
votes
0answers
25 views
Ordinal data: How to enter and analyze? [on hold]
When dealing with ordinal (Rank) data, what is the preferred way to perform data entry (wide format vs long format) in MS Excel? How does one analyze the data using R/ R Commander?
Example:
Q. What ...
-1
votes
0answers
19 views
k-fold cross-validation
5 fold cross-validation:
If you were to make a "5 fold cross-validation" out of a dataset where the dataset consists of 200 samples (100 patient samples and 100 control samples) and you want to make ...
-4
votes
0answers
29 views
How to um the column of a randomly generated matrix for writing my own function for multinomial distribution random variable generation using R
The question requires:
(a) Write your function for multinomial distribution random variable generation, the parameters should include
n: the number of random variables generated from a multinomial ...
-1
votes
2answers
38 views
Having issues with infinitely running nested for and while loops in R
I'm trying to model a population where each year the population is either growing quickly or slowly, to a max size of 5000. I then am running this while loop 5000 times to look at variation in time to ...
-1
votes
0answers
36 views
Easiest program/language to Pair with R to make a Package GUI [on hold]
Wait ... don't hurt me it isn't what you think!
I am looking to make an R package in OSX but this is not my issue (I have found guides for this), more importantly I want to have a GUI for it; much ...
1
vote
0answers
21 views
Time Series Forecasting Error in R
I'm attempting to use the forecast function from the forecast package v4.06 on a time series object I create. Depending on the size of the vector I pass into the time series function to generate a ...
-1
votes
2answers
48 views
R - cumulative sum by condition
So I have a dataset which simplified looks something like this:
Year ID Sum
2009 999 100
2009 123 85
2009 666 100
2009 999 100
2009 123 90
2009 666 85
...
1
vote
1answer
48 views
Working with “old” ggplot2 code
I made ton of figures with ggplot 0.8.9 (which is what I'm still running). Now I need to modify these figures to include legends. I am running across all sorts of problems that are hard to solve ...
0
votes
1answer
19 views
What is the R file format of a dissimilarity matrix and how do I read it in?
I am a very novice R programmer but I can't seem to find the answer anywhere. I apologize if this is a newbie question.
I have 435 items and have calculated differences between all of them, giving ...
0
votes
2answers
36 views
deleting rows with a specific criteria in R
I have data set up like this
date ID weight
Apr 4 1 21
Apr 5 1 22
Apr 6 1 23
Apr 4 2 30
Apr 5 2 31
Apr 6 2 32
Apr 7 2 12
I want to go in and ...
-5
votes
0answers
41 views
R, RandomForest, Windows, Mac, doSNOW, doMC, classes must be at least 2 error [on hold]
I've asked this question earlier however I didn't provide enough detail First and foremost, I would like thank you very much if you could spare me a moment to enlighten me with following problem.
I ...
0
votes
1answer
21 views
Show zero as hyphen in xtables
Say I have a knitr chunk such as this:
library(xtable)
<<>>=
x <- matrix(c(0, 1, 2, 0, 4, 5))
xtable(x)
@
Which yields the following LaTeX code (excerpt):
\hline
1 & 0,00 \\
2 ...