similar to: New Submission to CRAN note

Displaying 20 results from an estimated 30000 matches similar to: "New Submission to CRAN note"

2020 Sep 25
1
Extra "Note" in CRAN submission
When I run R CMD check on the survival package I invariably get a note: ... * checking for file ?survival/DESCRIPTION? ... OK * this is package ?survival? version ?3.2-6? * checking CRAN incoming feasibility ... NOTE Maintainer: ?Terry M Therneau <therneau.terry at mayo.edu>? ... This is sufficient for the auto-check process to return the following failure message: Dear maintainer,
2012 Jul 17
3
Finding the column with the maximum value by row
Hi, Let's say I have the following data: > a=matrix(c(1,2,4,4,2,1,1,2,4),nrow=3,byrow=T) > a [,1] [,2] [,3] [1,] 1 2 4 [2,] 4 2 1 [3,] 1 2 4 What syntax should I use to get R to tell me the column that corresponds to the maximum value for each row? For my example, I would like to get a vector that says 3, 1, 3 because the maximum value for row 1 is
2012 Apr 09
3
For loops
Hi, I am having trouble with syntax for a for loop. Here is what I am trying to do. class=c(rep(1,3),rep(2,3),rep(3,3)) out1=rnorm(length(class)) out2=rnorm(length(class)) out3=rnorm(length(class)) data=data.frame(class,out1,out2,out3) dat.split=split(data,data$class) for(i in 1:3){ sub[i]=dat.split[i] } However, the for loop doesn't work. I want to assign each split to a different
2009 Mar 12
3
Unable to run smoother in qplot() or ggplot() - complains about knots
I get the following error when I run qplot() qplot(grade, read,data = hhm.long.m, geom = c("point", "smooth")) Error in smooth.construct.cr.smooth.spec(object, data, knots) : x has insufficient unique values to support 10 knots: reduce k. I am not sure how to tackle this problem. When I take a subsample (< 1000) than I am able to run that function but with my sample
2011 Mar 30
6
Quick recode of -999 to NA in R
Hi, I am trying to write a loop to recode my data from -999 to NA in R. What's the most efficient way to do this? Below is what I'm presently doing, which is inefficient. Thanks, Chris dat0 <- read.table("time1.dat") colnames(dat0) <- c("e1dq", "e1arcp", "e1dev", "s1prcp", "s1nrcp", "s1ints",
2010 Jul 22
2
Multilevel survival model
* Please cc me if you reply as I am a digest subscriber * Hi, I am wondering how I can run a multilevel survival model in R? Below is some of my data. > head(bi0.test) childid famid lifedxm sex age delta 1 22.02 22 CONTROL MALES 21.36893 0 2 13.02 13 MAJOR MALES 21.18001 0 3 64.02 64 CONTROL MALES 20.09377 0 4 5.02 5 CONTROL FEMALES
2010 Jul 23
1
Survival analysis MLE gives NA or enormous standard errors
Hi, I am trying to fit the following model: sr.reg.s4.nore <- survreg(Surv(age_sym4,sym4), as.factor(lifedxm), data=bip.surv) Where age_sym4 is the age that a subject develops clinical thought problems; sym4 is whether they develop clinical thoughts problems (0 or 1); and lifedxm is mother's diagnosis: BIPOLAR, MAJOR DEPRESSION, or CONTROL. I am interested in whether or not
2011 Mar 29
4
Creating 3 vectors that sum to 1
I have 3 vectors: p1, p2, and p3. I would like each vector to be any possible value between 0 and 1 and p1 + p2 + p3 = 1. I want to graph these and I've thought about using scatterplot3d(). Here's what I have so far. library(scatterplot3d) p1 <- c(1,0,0,.5,.5,0,.5,.25,.25,.34,.33,.33,.8,.1,.1,.9,.05,.05) p2 <- c(0,1,0,.5,0,.5,.25,.5,.25,.33,.34,.33,.1,.8,.1,.05,.9,.05) p3 <-
2012 Jul 20
2
Changing ungrouped cases to grouped cases
Hi, I have my data the following way: y A B C 0 1 1 2 0 1 2 1 1 1 1 2 0 1 1 2 1 1 1 2 1 1 2 1 0 1 2 2 . . . And so on. How can I make my data look like the following: y A B C 2 1 1 2 1 1 2 1 0 1 2 2 . . . In other words how can I change my ungrouped cases into grouped cases? Thanks! Chris [[alternative
2009 Mar 19
2
Randomly splitting a data frame in half
I have a data frame in long format and I would like to randomly divide this data frame in half. The data frame consists of 39622 rows and I initially tried ... randomsample1 <- data[sample(nrow(data),19811), ] Where allows me to randomly select half of the rows and assign them to randomsample1 but then I couldn't figure out how to select those rows that were not selected and assign
2011 Apr 06
3
Getting number of students with zeroes in long format
Hi, I have longitudinal school suspension data on students. I would like to figure out how many students (id_r) have no suspensions (sus), i.e. have a code of '0'. My data is in long format and the first 20 records look like the following: > suslm[1:20,c(1,7)] id_r sus 11 0 15 10 16 0 18 0 19 0 19 0 20 0 21 0 21 0 22 0 24 0 24
2010 May 28
3
Gelman 2006 half-Cauchy distribution
Hi, I am trying to recreate the right graph on page 524 of Gelman's 2006 paper "Prior distributions for variance parameters in hierarchical models" in Bayesian Analysis, 3, 515-533. I am only interested, however, in recreating the portion of the graph for the overlain prior density for the half-Cauchy with scale 25 and not the posterior distribution. However, when I try:
2010 May 13
1
Questions about ggplot2
Hi I have two questions about using ggplot2. First, I have multiple columns of data that I would like to combine into one histogram where each column of data would correspond to one bar in the histogram. Each column has 0 or 1s and I want my bars in the histogram to correspond to the sum of the 1s in each column. Does that make sense? Second, is there a way to completely turn off the legend?
2009 Jun 28
1
ggplot2 x axis question
Hi, I have 45 models that I have named: 1, 2, 3, ... , 45 and I am trying to plot them in order of ascending BIC values. I am however unclear as to how I can get the models to line up on the x-axis by BIC and not by numeric order. For example, if model 5 has a lower BIC than 1, I want it to be the first point on the left hand side of the curve. This seems to work in plot: plot(1:45,
2009 Jun 28
1
ggplot2 x axis question
Hi, I have 45 models that I have named: 1, 2, 3, ... , 45 and I am trying to plot them in order of ascending BIC values. I am however unclear as to how I can get the models to line up on the x-axis by BIC and not by numeric order. For example, if model 5 has a lower BIC than 1, I want it to be the first point on the left hand side of the curve. This seems to work in plot: plot(1:45,
2011 Aug 04
1
Plotting just a portion of a smoother graph in ggplot2
Hi, I am using ggplot2 to with the following code: gmathk2 <- qplot(time,math,colour=Kids,data=kids.ach.lm.k5,geom="smooth",method="lm",formula=y~ns(x,1)) + opts(title="Smoother Plot: Math K-5") + xlab("Time") + ylab("Math") + scale_colour_brewer(pal="Set1"); gmathk2 This plots all the smoother for all the x values. What I'd like
2012 Nov 03
2
Replacing NAs in long format
Hi, I have the following data: > data[1:20,c(1,2,20)] idr schyear year 1 8 0 1 9 1 1 10 NA 2 4 NA 2 5 -1 2 6 0 2 7 1 2 8 2 2 9 3 2 10 4 2 11 NA 2 12 6 3 4 NA 3 5 -2 3 6 -1 3 7 0 3 8 1 3 9 2 3 10 3 3 11 NA What I want to do is
2013 Feb 04
1
Combining data from different saved files with same object names into one data frame
Hi, I am simulating data from a zero-inflated negative binomial model. I have 4 different conditions and I've saved various information about the models in zinbsumbstat-jklm.rdata (as shown below). What I want to do is print information from each of these *.rdata and store them in one large object (a matrix or a data frame). However, within each data the objects all have the same name. So I
2015 Oct 18
2
Expired key for Ubuntu CRAN repository
Hello, I was following the instructions at https://cran.r-project.org/bin/linux/ubuntu/#secure-apt but encountered this message upon apt-get update: GPG error: http://cran.rstudio.com trusty/ Release: The following signatures were invalid: KEYEXPIRED... And then the following on apt-get install: WARNING: The following packages cannot be authenticated! Investigating a little, it looks like
2016 May 27
3
Update CRAN submission process
The CRAN submission process seems in need of a massive overhaul. Why has this process not been automated yet? ? Patrick Perry Assistant Professor NYU Stern School of Business