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 %>% gro
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(3,2))
> date <- c(rep(1,2),rep(2,2),rep(3,2),rep(4,2),rep(5,2),
>
I'm running R (currently 4.4.1) on Linux Mint
> sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Linux Mint 20.3
...truncated...
To install a new R package, is it better to use Linux Mint's pacakge
manager (e.g. synaptic, apt-get, or similar), or to install
9E53101D261BEC070CFF1A0DC8BC50E715A672A0
On Sat, 14 Sep 2024 13:27:23 +0530, Deepayan Sarkar wrote:
>On Fri, 13 Sept 2024 at 23:36, Christopher W. Ryan
> wrote:
>>
>> For me, Bert's suggestion produces a plot with two black symbols
>> above the plotting region, a circle and a triangle
ransit_time, groups = impact, data = .,
>pch = 16:17,
>cex = 1.8,
> scales = list(cex = 1.4),
>key = list(points = list(pch =16:17) ))
>
>Cheers,
>Bert
>
>
>On Fri, Sep 13, 2024 at 9:53 AM Christopher W. Ryan
&
the most from their data.
www.agencystatistical.com
Public GnuPG email encryption key at
https://keys.openpgp.org
9E53101D261BEC070CFF1A0DC8BC50E715A672A0
On Fri, 13 Sep 2024 08:29:20 +0100, CALUM POLWART wrote:
>Add:
>
>key = list(points=16:17)
>
>Into the dotplot section possibly without the
I am making a dotplot with lattice, as follows:
dd %>% dotplot( segment ~ transit_time, groups = impact, data = .,
as.table = TRUE,
pch = 16:17,
cex = 1.8,
scales = list(cex = 1.4),
auto.key = TRUE)
impact is a factor
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
may be extracted by the generic functions of the same name, rather than
by the $
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 of one
factor, and the columns had strips on the top with the levels of the
other factor. Sort of lik
Hello. Running R 4.2.3 on Windows 10. Using survimer package version
survminer_0.4.9 published 2021-03-09.
I'm encountering an error with ggsurvplot() in the survminer package.
Email to the author/maintainer about 2 weeks ago has not yet resulted in
a reply.
I seem unable to produce a n.censor.ta
Are you referring to the zeroinfl() function in the countreg package? If
so, I think
predict(fm_zinb2, type = "zero", newdata = some.new.data)
will give you pi for each combination of covariate values that you
provide in some.new.data
where pi is the probability to observe a zero from the point
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" wrote:
>
>> Anyone seeing similar?
>
> Same for me.
>
> While it worked, C
at https://cran.r-project.org/ I get this error message:
=
Secure Connection Failed
An error occurred during a connection to cran.r-project.org.
PR_END_OF_FILE_ERROR
Error code: PR_END_OF_FILE_ERROR
The page you are trying to view cannot be shown because the
authenticity
Very helpful, Deepayan, and educational. Thank you.
What does NSE stand for?
Thanks,
Chris
Deepayan Sarkar wrote:
>
> --Chris Ryan
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEAS
Hello. My question is in the subject line. Using R 4.1.3 on Windows 10.
Commented MWE below. Thanks.
--Chris Ryan
library(dplyr)
library(lattice)
## fabricate a dataframe
dd <- data.frame(agency = sample(LETTERS, size = 5),
total = sample(100:200, size = 5),
las = sample(20:40, size = 5))
dd <
date appears to be a character variable, and R is treating it as such.
str(dt1)
might give you some insight. Or the dplyr equivalent
glimpse(dt1)
I think R did what you asked, but if you want to be able to order
records by date, in temporal order, you need to tell R that it is a date:
library
I'm using a .Rnw --> Sweave --> pdflatex workflow on Windows 10, with emacs
26.3 and ESS (not sure which version.)
I have this code:
n.tests.7 <- 3 ## for example
trailing.7.pos.percent <- 12 ## for example
trailing.7.message <-
ifelse( n.tests.7 > 0,
paste("In the past seven day
I have both the 1st and the 2nd edition of Frank Harrell's book. I'll send
you the 1st edition if you cover the postage. (4th class book rate would
probably not be all that expensive.) Let me know off-list, if interested.
--Chris Ryan
[[alternative HTML version deleted]]
I'm attempting to describe the height of a fall from a building, so the
vertical orientation has a certain attraction.
dd <- data.frame(nothing = rep(1:2, each = 6), height = runif(n=12, min=0,
max=30))
dd
## pretty much what I'm looking for
with(dd, stripchart(height, vertical = TRUE))
## but i
I"m more of a lattice guy than a ggplot guy, but perhaps this is part of
the problem:
.
> geom_point(aes(y = m_K, color = "red")) + # >> you've
> associated "K" with the color red
> geom_smooth(aes(y = m_K, color = "red")) +
> geom_point(aes(y = m_J, color = "blue")) + ##
I may not be understanding your question, or what you mean by "activate
this package," but in general terms, packages must first be installed, with
install.packages("thepackageIwant")
And then, for any given R session in which you want to use that package:
library(thepackageIwant)
My apologies
Usually R provides a somewhat informative error message about where,
exactly, it was surprised by something. Here, I suspect (not certain,
without seeing the error message) that R was objecting to the space between
HH and size. R cannot tell whether that represents two different variables
where you
Couldn't one just show prospective employers some impressive things
one has done in R? Seems to me that would be more meaningful than any
sort of certificate.
--Chris Ryan
On Wed, Jan 4, 2023 at 4:08 AM Mukesh Ghanshyamdas Lekhrajani via
R-help wrote:
>
> Hey Rich,
>
>
>
> Out of all the help th
I think there are probably a number of purposes for (advantages to?)
the pipe operator. One is that it can avoid nested operations:
plot(mean(sqrt(c(1:10 ## this is my silly example code
which can get difficult to read. This is arguably easier to read and
understand:
c(1:10) %>% sqrt() %>%
In clinical medicine, the question the patient asks rarely represents
their main concern. Most of what I've done in my career, and most of
what I've taught, is about how to have the back-and-forth dynamic dialoq
with the patient, to help them formulate what's really on their mind,
and make sure I u
e: the title doesn't fit in the box title and is truncated, but it
> appears beneath it in full in the box, and I can resize the box if I wish to.
>
> -- Bert
>
>
>
> On Fri, Dec 9, 2022 at 10:44 AM Christopher Ryan via R-help
> wrote:
>>
>> You can see
You can see from the code below that the title of the dialog box is too
long for the width of the selection box. How might I widen the box? Thanks.
--Chris Ryan
counties <- c("TIOGA", "BROOME", "ONTARIO", "ONONDAGA", "WESTCHESTER")
chosen.county <- select.list(counties, preselect = NULL, multip
If the units of analysis are real spatial regions (e.g. states), how
about a cartogram?
https://gisgeography.com/cartogram-maps/
An R package (I have no experience with it)
https://cran.r-project.org/web/packages/cartogram/index.html
The advantage of a cartogram is that it is a single graphic,
install.packages("titanic")
library(titanic)
training_set <- titanic_train#Saves the train set as a variable so that we do
not affect the original data
testing_set <- titanic_test #Saves the test set as a variable so that we do not
affect the original data
names(training_set) #Prints the name of
"The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Mon, Mar 14, 2022 at 9:27 AM Christopher W Ryan via R-help
> wrote:
> >
> >
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 hoping to find a way to return all *but* one specified element of
a list. Speaking loosel
rouble with having an open mind is that people keep coming along and
> sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Tue, Nov 16, 2021 at 7:45 AM Christopher W Ryan via R-help <
> r-help@r-pro
eclrs.3 %>%
mutate(start.week = floor_date(realCollectionDate, unit = "week")) %>%
group_by(start.week, k12) %>%
summarise(n = n(), pctpos = 100 * mean(realResult)) %>%
xyplot(pctpos ~ start.week | k12, col = "red", data = ., layout = c(1,2),
ylab = "percent of test results positive", xlab = "spec
Tracy--
I enjoy doing this sort of thing. Over the years I've done two full-day
"introduction to R" workshops for high school students. The workshops also
inevitably get into software-agnostic, basic issues about how to think
about data, and how to measure, record, and store it---which is all pret
Is the grouping beforehand necessary? Could you simply, "for all the dates
that are "4.01.2020" and have the "Value" greater than zero add 5 to the
"Value" "? I may be missing something.
--Chris Ryan
On Wed, May 26, 2021 at 11:53 AM Elahe chalabi via R-help <
r-help@r-project.org> wrote:
> Hi
aving an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Jan 19, 2021 at 3:01 PM Christopher Lloyd via R-help
wrote:
Hi all, I think this is only the second time that I have poste
Hi all, I think this is only the second time that I have posted so I apologise
if my etiquette isn't quite correct.
I'm loading a large (~30GB) geojson file into R using readOGR on a HPC. I am
also loading a small shapefile, and then trying to undertake some processing on
the large geojson using
You might like the beeswarm package.
--Chris Ryan
SUNY Upstate Medical University
and
Broome County Health Department
On Thu, Jul 23, 2020 at 1:15 AM array chip via R-help
wrote:
>
> Hello everyone,
>
> I saw this scatterplots from a paper and thought it looked very nice:
>
>
> https://drive.go
I've been conducting relatively simple COVID-19 surveillance for our
jurisdiction. We get data on lab test results automatically, and then
interview patients to obtain other information, like clinical details.
We had been recording all data in our long-time data system (call it
dataSystemA). But as
I use R every day with pretty sensitive data in my county health
department. Of course, this is for manipulation and analysis of data
pulled from their sources, not for interacting directly with, or
updating, patient records in any clinically operational sense. As others
have said, the structure an
Am I interpreting this offer correctly, that it is for libraries to
obtain access to the e-books for free? It does not seem to me that an
invididual can download one--am I missing that part?
Thanks
--Chris Ryan
Mark Leeds wrote:
> Abby: here's an easier link for seeing what you might like.
>
>
The message at that URL reads:
CRAN mirror restricted to UC Berkeley
The CRAN mirror at UC Berkeley's College of Natural Resources is no
longer available to off campus users and has been removed from the CRAN
mirror list. The load on our server was too much.
Berkeley folks can continue to access
aving an open mind is that people keep coming along
>and sticking things into it."
>-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>On Thu, Apr 2, 2020 at 2:23 PM Christopher W. Ryan
> wrote:
>>
>> I would like to place two se
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, (plot(Sepal.Length ~ Petal.Width)))
but with lattice, so one
Help! I followed the instructions I found to install ggbiplot, and entered
"install_packages("devtools")" about 25 minutes ago, and the installation
procedure is continuing as I write this. Although it's difficult to tell, there
appears to be substantial repetition in the messages displayed.
Sh
> On 21.02.2020 20:10, Christopher W. Ryan wrote:
>> sessionInfo at end of message.
>>
>> I have data that I was given as an Excel .xlsx file. It contains 96266
>> lines and 24 columns. I opened it in OpenOffice.org and saved it in .csv
>> format, using the pip
sessionInfo at end of message.
I have data that I was given as an Excel .xlsx file. It contains 96266
lines and 24 columns. I opened it in OpenOffice.org and saved it in .csv
format, using the pipe character as a field separator. This produced a
file with 96266 lines.
When I read it into R thusly
Homework questions are generally frowned upon on R-help List. It is best to
discuss those questions with your instructor.
--Chris Ryan
SUNY Upstate Medical University Clinical Campus at Binghamton
On Mon, Feb 10, 2020 at 9:39 AM hương phạm wrote:
> N1 Consider the database "LakeHuron" , contain
Hi, I'm not experienced with R at all. I'm using some canned code to produce
RSA models in the RSA package. I'd like to be able to adjust the alpha for the
a1-a4 confidence intervals.
This doesn't appear to be a native option for the RSA package, unless I'm
missing something because I'm a nov
I'm not understanding how the tidyverse handles date formats.
output of sessionInfo() at the end of my message.
dateRanges <- structure(list(apptType = structure(1:2, .Label = c("initial
visit",
"start of treatment visit"), class = "factor"), minMadeRequestDates =
structure(c(18124,
18115), class
Is this homework for a class? If so, it would be better to ask your professor
for guidance. R-help List frowns on homework questions.
Chris Ryan
On November 7, 2019 2:46:32 AM EST, Sadia Seddiqi wrote:
>Could you help me how I can solve run this code in R-labUnions
>
>1-You are picking flowers
The following produces a scatterplot with rugs on both the vertical and
horizontal axes.
library(dplyr)
library(stringr)
library(lattice)
library(latticeExtra)
## .
xyplot(scheduleInterval ~ calledForApptDate, data = dd.2, xlab = "Date
patient called for appointment", ylab = "Days in the futur
I'm trying to modernize my way of thinking, and my coding, into the
dplyr/tidyverse way of doing things.
To get basic summary statistics on a variable in a dataframe, with the
output also being a dataframe. I previously would do something like this,
using other packages:
library(doBy)
doBy.output
Alas, we spend so much time and energy on data wrangling . . . .
I'm given a collection of csv files to work with---"found data". They arose
via saving Excel files to csv format. They all have the same column
structure, except that some were saved with column names and some were not.
I have a cod
You will get the best help if you:
1. post email in plain text, not html
2. post the command/code you issued and the result/error that was returned
3. Information about your operating system sometimes helps.
--Chris Ryan
Binghamton, NY, US
On Tue, Jul 16, 2019 at 3:36 PM Sujaya wrote:
> Respec
pwr2ppl contains protocols for running a wide range of power analyses.
Analyses range from simple approaches such as t-test and correlations
to multifactor ANOVA (between and within subjects, linear mixed model
approaches) and regression-based approaches (basic multiple
regression, moderated regres
Sorry, was typing on my phone. Not "compy." "Computer." I was asking
whether you were working on your own, standalone, computer, or whether
perhaps this was an institutional, networked, machine, on which you
don't have write permissions that you need.
--Chris Ryan
Spencer Brackett wrote:
> Mr
This TV series might have some advice on that.
https://www.imdb.com/title/tt2543312/
--Chris Ryan
On Tue, Jul 3, 2018 at 9:25 AM, J C Nash wrote:
> . . . Now, to add to the controversy, how do you set a computer on fire?
>
> JN
>
>
[[alternative HTML version deleted]]
___
Richard--
Nice. If I understand your code correctly, in the line
ddm <- matrix("", (n+2) %/% nc, nc)
I could instead use
ddm <- matrix("", (n + nc - 1) %/% nc, nc)
for generalizability, as I may have to increase nc as the list of words
grows ever longer.
Thanks everyone. Several good suggesti
I'm writing code for a recurring report, using an R --> Sweave --> pdflatex
workflow. It includes a character vector of short words that I would like
to display compactly, in columns on a page, rather than one word per line,
which would waste a lot of space. The vector of words will increase
unpred
ck", "red"))
>
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> On Tue, May 1, 2018 at 1:17 PM, Christopher W Ryan
> wrote:
>
>> How would I color points conditional on their value in a plot of a time
>> series. Something like this:
>
How would I color points conditional on their value in a plot of a time
series. Something like this:
## demonstration data
ttt <- ts(rpois(12, lambda = 8), start = c(2000, 1), freq = 4)
ttt
plot(ttt, type = "p")
## doesn't work--all points the same color
plot(ttt, type = "p", col = ifelse(ttt <
A few years ago I gave two 5-hour workshops about R to a class of US high
school students in a somewhat-accelerated science research class (so these
were already science-motivated kids). They had been using mainly Excel,
and some SPSS for which the school had a license. Overall they seemed to
lik
Great question. What do I want? I want my co-workers to stop using Excel
spreadsheets for data entry, storage, and sharing! I want them to
understand the value of data discipline. But alas . . . .
I work in a county health department in the US. Between dplyr, stringr,
grep, grepl, and the base R r
Hi All,
I had working code under R v3.2 that serialized an object, stored the
serialized object in a database, and then successfully retrieved and
hydrated that object.
I recently updated to R v3.4.1 and the same code now fails.
Here is the code in question (simplified), and the resulting error:
Leonardo--
R-help can be a very useful resource. Some suggestions to use it well:
1. use an informative subject line, not "help"
2. include a "minimal working example:" a *little* data, the code that,
with those data, reproduces your problem, and the error message that
resulted.
As to your parti
A couple thoughts:
1. converting factors into dates often requires that they be converted to
character first.
2. you don't really have dates; you have just months and years
3. therefore perhaps the as.yearmon() function in the zoo package could help
library(zoo)
my.factor <- factor("Feb 2017")
Rather than just posting your error message, it helps immensely to post the
code that produced the error--indeed with some small sample data that
reproduces the problem.
x <- rnorm(40)
y <- 0.6 * x + rnorm(40, sd = 0.3)
plot(y ~ x)
model <- lm(y ~ cos(x))
summary(model)
plot(y ~ cos(x))
abline(mod
I create a data frame, then, using package surveillance version 1.3, I
convert it to a surveillance time series (sts) object and then to a disProg
object. But in the plot of the disProg object, the dates seem to be
mislabelled?
Grateful for any advice.
--Chris Ryan
Broome County Health Departmen
Thank you Frans. This is exactly the sort of nuance that I want to learn
about.
--Chris
Frans Marcelissen wrote:
Hello Christopher and others
:
What cannot be stressed enough is: do not combine both packages, it
gives errors and incorrect results! I will show that below
I've set myself the task of learning about these packages, and about
tidy data concepts.
What is the relationship between plyr and dplyr? Does the latter
replace the former (meaning I can concentrate on learning the latter)?
Or is there ever a need to use functions from both (meaning I should
lea
pages
nowhere to be found. Alas!
But thanks anyway.
--Chris
On Fri, Jul 29, 2016 at 3:54 PM, David Winsemius wrote:
> Been off the grid for the last year? MS bought Revolution R.
>
>
> Sent from my iPhone
>
>> On Jul 29, 2016, at 11:30 AM, Christopher W. Ryan
>> wrot
I'm trying to run a Weibull parametric survival model for recurrent
event data, with subject-specific frailties, using survreg() in the
survival package, and I'm having trouble understanding the output and
its notation, and how that translates to some of the books I am using as
references (DF M
This might be a bit off-topic, but up until recently (a day or so ago?)
I loved using inside-r.org as a quick and easy way to access help pages
on R commands. Took me to what I needed without any fuss. Now that URL
redirects to the "Microsoft R Application Network"? Looks to be
something relat
I think much depends on how you define heat wave.
--Chris Ryan
Broome County Health Department
Binghamton, NY USA
On Mon, Jul 18, 2016 at 6:16 AM, Damjan / wrote:
> Dar all,
>
> I have a txt file with 4 column data about daily maximum temperature for
> some years.
>
> I need to find the number o
Dear R-User,
I have written a simple code to analyze some data using Bayesian logistic
regression via the R2WinBUGS package. The code when run in WinBUGS stops
WinBUGS from running it and using the package returns no results also.
I attach herewith, the code and a sample of the dataset.
Any s
changes on the objects in R.
Have you looked into various "reproducible research" systems for R, like Sweave
or knitr? They allow you to include analysis code and text of a manuscript or
report all together in one file.
Christopher W. Ryan
sent from my phone with BlueMail
On Ju
Excellent, thanks. Much simpler.
--Chris
Christopher W. Ryan, MD, MS
cryanatbinghamtondotedu
https://www.linkedin.com/in/ryancw
Early success is a terrible teacher. You’re essentially being rewarded
for a lack of preparation, so when you find yourself in a situation
where you must prepare, you
Here is one way:
dd <- data.frame(var1=c("string1", "string2", "string3"), var2=c(3,7,4))
dd
with(dd, barplot(var2, names.arg=var1))
--Chris Ryan
Binghamton, NY
yoursurrogate...@gmail.com wrote:
> Hello, I can't post my code since it's on a work computer.
>
> But basically, I have a dataframe t
I would like to conduct a survival analysis, examining a subject's
time to *next* appearance in a database, after their first appearance.
It is a database of dated events.
I need to obfuscate or anonymize or mask the subject identifiers (a
combination of name and birthdate). And obviously any give
Hello,
I'm aware that this is not a suitable question for this resource but neither
Stackoverflow nor shiny help forum could help with the problem I'm having- is
it possible that you could point me in the right direction?
thanks
Chris
I have a command from a particular package that outputs a gra
This might be useful: http://adv-r.had.co.nz/
On Tue, Apr 5, 2016 at 10:31 AM, Francisco Banha wrote:
> Dear All,
>
> I'm currently working on a project with
> the purpose of remotely executing R code, which requires me to have to
> work with the code of R itself. I've searched the Internet for
Hi Jose,
You're referring to your response variable when you're saying it's missing
some of the choices, right? Are your response choices ever known or do they
just occur with extremely low frequency? Either way, I think the mlogit
package would be inappropriate for you. I imagine you would have m
Hello,
I am a student and I only have basic knowledge of R. I have been given the task
of having to monitor cells' migration in 2 dimensions. I have been given 2
files one containing the the X-coordinates and the other contains the
Y-coordinates of the cells. There are 50 cells and there moveme
.org/web/packages/nhanesA/>
install.packages("nhanesA") will get you started.
Hopefully it will be useful for clinical research and general data
exploration.
Sincerely,
Christopher Endres
[[alternative HTML version deleted]]
___
R-pa
Saturday, August 1, 2015 3:32 AM, David Winsemius
wrote:
On Jul 31, 2015, at 6:36 PM, Christopher Kelvin via R-help wrote:
> Dear All,
> I am performing some simulations for a new model. I run about 10,000
> iterations with a sample of 50 datasets and this returns one set of 50
&g
Dear All,
I am performing some simulations for a new model. I run about 10,000 iterations
with a sample of 50 datasets and this returns one set of 50 simulated data.
Now, what I need to obtain is 10 sets of the 50 simulated data out of the
10,000 iterations and not just only 1 set. The model i
h "heroin"
because it is contained in the word "heroine" .
There may be other things going on too.
Thanks.
--Chris
On Thu, Jul 9, 2015 at 3:24 PM, John Fox wrote:
> Dear Christopher,
>
> My usual orientation to this kind of one-off problem is that I'm looking for
rds" on whitespace.
>>>>>Then the matching is vectorized with the any( %in% ... ) call.
>>>>>
>>>>>Cheers,
>>>>>Bert
>>>>>Bert Gunter
>>>>>
>>>>>"Data is not information. Information is not knowledge. And knowledge
>>>>&
Running R 3.1.1 on windows 7
I want to identify as a case any record in a dataframe that contains any
of several keywords in any of several variables.
Example:
# create a dataframe with 4 variables and 10 records
v2 <- c("white bird", "blue bird", "green turtle", "quick brown fox",
"big black do
Running R 3.1.1 on windows 7
I want to identify as a case any record in a dataframe that contains any
of several keywords in any of several variables.
Example:
# create a dataframe with 4 variables and 10 records
v2 <- c("white bird", "blue bird", "green turtle", "quick brown fox",
"big black do
Tom and Bill--
Thanks! Both excellent solutions.
--Chris
Christopher W. Ryan, MD, MS
cryanatbinghamtondotedu
Early success is a terrible teacher. You’re essentially being rewarded
for a lack of preparation, so when you find yourself in a situation
where you must prepare, you can’t do it. You
umeric(dd))
# But horizontal axis label is not very informative
# would prefer labeling the start of each month
plot(density(as.numeric(dd)), axes=FALSE)
library(zoo)
new.axis <- as.yearmon(dd)
# but then what? This is where I get stuck--adding back a sensible axis
Grateful for any guid
Hi:
I am trying to write code to run a simultaneous probit-tobit
model (Chappell, 1982) in order to quantify the determinants of
legislator voting behavior. I can't seem to find any background on this.
I have worked with code for simple logit and probit models, but this is
a di
I would recommend these for the absolute beginner with R:
"A Beginner's Guide to R" by Zuur
and
"Data Manipulation with R" by Spector
I have not seen this, but if their pattern holds, this one coming out
from Highland Statistics will also probably be useful for a newcomer:
A Beginner's Guide to
I'm running R on Windows 7. Clean install on a brand new computer
yesterday. I installed Protext then R then Vincent Goulet's emacs
with ESS, in that order.
I then installed some R packages, in the R terminal window. Among them was car
Today I opened emacs, hit M-x R to start an R session, and
can be downloaded from
http://pastebin.com/05s5RKYw . It runs to 962 lines of code, so I won't paste
it here. The offending ggplot_gtable calls are at lines 909 - 918.
Usage:
vectis.cap(chickwts$weight, target = 300, USL = 400, LSL = 100)
Thank yo
gt; Hi Chris,
>
> Try the form: plot(dens, useRaster=FALSE, ribargs=list(useRaster=FALSE))
>
>
>
> Pablo
>
>
> 2014-06-20 15:58 GMT-05:00 Christopher W Ryan :
>
>> I'm back in the office with the machine that was giving me trouble.
>>
>> # fresh st
I'm back in the office with the machine that was giving me trouble.
# fresh start-up of R 3.1.0, installed on the my machine's hard drive,
#under Windows XP Service Pack 3.
# spatstat version 1.37-0
library(spatstat)
data(redwood)
dens <- density(redwood)
str(dens) # everything looks to be in ord
ure it out.
>
> regards
> Adrian
>
>
> Prof Adrian Baddeley FAA
> University of Western Australia
> ____
> From: Pablo Ramón [para...@utpl.edu.ec]
> Sent: Wednesday, 18 June 2014 9:36 PM
> To: Rolf Turner
> Cc: Christophe
1 - 100 of 348 matches
Mail list logo