Search Archives
Search tips
from:Name
Search by author name, e.g. from:Duncan Murdoch
"exact phrase"
Match an exact phrase
word1 word2
Match messages containing both words
Date range
Use the date pickers to filter results to a time period
Use the list dropdown to narrow results to a specific mailing list. Combine from: with other terms to filter by author and content.
I have a long sequence of dates, about 6 years worth, as one column in a data frame. How can I test whether the sequence is consecutive, that is, without gaps? Thanks. --Chris -- Christopher W. Ryan, MD SUNY Upstate Medical...
Personally, I'd do this in the tidyverse with dplyr and its row_number() function. olddata %>% group_by(ID) %>% mutate(first = as.integer(row_number() == 1)) --Chris Ryan Sorkin, John wrote: > ID <- c(rep(1,10),rep(2,6),rep...
I'm running R-3.0.3 on Windows XP Professional on an institutional PC. (My freedom to update to a more recent version of R is limited, although I might be able to prevail upon the powers that be...
I have a marked ppp object, about 5300 points. One of the marks is called period and has values 1:13. What is an efficient way to make 13 period-specific subset point patterns? All I've been able to...
Years ago, I recall creating lattice plots with two binary factors, call them f1 and f2, as in xyplot(y ~ x | f1 + f2, data = dd) and I made it so the rows had strips on the left with the levels...
Duncan-- The .tex file that you describe as output of Sweave("test.Rnw") is what I had expected. But I get this .tex file when I run Sweave: \documentclass[12pt]{article} \usepackage[margin=1.25in]{geometry} \usepackage{graphicx} \usepackage{Sweave...
suppose I have some logical vector x <- as.logical(c(0,0,0,1,0,0,1,1,0)) x How would I make the words TRUE appear on the screen in a different color from the words FALSE? Thanks...
Ah, thanks all. Guess I missed the message before they started the maintenance. --Chris Ivan Krylov wrote: > On Wed, 15 Nov 2023 14:13:00 -0500 > "Christopher W. Ryan via R-help" <r-help at r-project.org> wrote: > >> Anyone...
I'm using quantreg package version 5.98 of 24 May 2024, in R 4.4.1 on Linux Mint. The online documentation for quantreg says, in part, under the description of the rq.object, "The coefficients, residuals, and effects...
Many moons ago, the US CDC came out with DoEpi, which was computer-based instruction in outbreak investigation, using the CDC's Epi Info software. I recall two instructionally useful cases in DoEpi: the Oswego church supper outbreak (a classic...
I would like to place two separate plots, one above the other, something like this (MWE for illustration): library(lattice) data(iris) layout(matrix(c(1,2), 2, 1, byrow = TRUE)) with(iris, (plot(Sepal.Length ~ Petal.Length))) with(iris...
Ah, it's split(), of course. That was silly of me. --Chris Ryan Christopher W. Ryan wrote: > I have a marked ppp object, about 5300 points. One of the marks is > called period and has values 1:13. What is...
I've just learned about pluck() and chuck() in the purrr package. Very cool! As I understand it, they both will return one element of a list, either by name or by [[]] index, or even "first" or "last" I was...
dd <- data.frame(longVariableName1=sample(1:4, 10, replace=TRUE), longVariableName2=sample(1:4, 10, replace=TRUE)) dd # define who is a case and who is not transform(dd, case=(longVariableName1==3 | longVariableName2==3)) But in reality I have 9...
Sorry, for completeness: library(dplyr) olddata %>% group_by(ID) %>% mutate(first = as.integer(row_number() == 1)) --Chris Ryan Christopher W. Ryan wrote: > Personally, I'd do this in the tidyverse with dplyr and its row_number() > function. > > olddata %>% group_by...
What would a pdf of such a distribution even look like? Intuitively, it seems like the pdf everywhere would be, for all practical purposes, zero? So no probability of drawing any value? --Chris Ryan Daniel Lobo wrote: > Hi, > > I want...
I would like to try to do a journal club session for my family practice residents on the uses, and especailly the pitfalls, of compound outcome variables, like "stroke or myocardial infarction or coronary bypass surgery." They appear frequently in...
Running R 2.13.1 on Windows XP. I would like to get week of the year (1-52) for each date. library(chron) dts <- dates(c("02/27/92", "02/27/92", "01/14/92","02/28/92", "02...
I mailed a check for an R Foundation membership almost a year ago, along with the form. In US dollars, corrected by the then-current Euro exchange rate. It has never been cashed. Christopher W. Ryan, MD SUNY Upstate Medical...
I don't know about 3.0.1, but the 2.15.x that I'm still using requires the foreign package--that's where the read.dta command resides. library(foreign) --Chris Ryan SUNY Upstate Medical University Binghamton, NY...
Can't find what you're looking for? Try searching with Google .