Displaying 20 results from an estimated 2000 matches similar to: "Idiomatic way to do a non-database Enumeration?"
2009 Nov 03
1
How to display full name for the coefficients/factors in summary()?
Hi,
I am wondering if there is a way to display the full anme of the
regression coeffients/factors in the summary?
Suppose I have a bogus data set using weekday as factor which has 7 levels
such as:
mydata <- sample(364)
wk <- rep(1:7, 52)
weekday <-
2009 Nov 02
2
how to print the full name of the factors in summary?
Hi,
I am wondering if there is a simple way to fix the problem I am having.
For unknown reason, I could not get the full name of the factors to be
printed in the summary. I have tried to used summary.lm as well but the
problem still persists.
SJ$Weekday <-
2007 Dec 13
1
counting weekday in a month in R
Hi,
I am trying to count weekday of the month using R. For example, 1/4/2001
is the 4th weekday of Jan, and 1/5/2001 is the 5th weekday of the month, and
1/8/2001 is the 6th weekday of the month, etc. I get as far as extracting
the weekdays from a sequence of dates (see below). But I have not yet
figured out a fast way of counting without using a For Loop. Does anyone
know how to do such counting
2011 Jul 22
1
Summing daily values by weekday and weekend
(Sorry for reposting. Please delete previous msgs. Thanks!)
Hi, all
Here I created a data frame like
mydates<- seq(as.Date("2010-05-29"), length = 43, by = "day")
myvalues<-runif(43,0,1)
myframe<-data.frame(dates=mydates, day=weekdays(dates), value=myvalues)
dates day value
1 2010-05-29 Saturday 0.14576143
2 2010-05-30 Sunday 0.37669604
2011 Jul 22
1
Summing values by weekday and weekend - based on daily dates
Hi, all
Here I created a data frame like
mydates<- seq(as.Date("2010-05-29"), length = 43, by = "day")
myvalues<-runif(43,0,1)
myframe<-data.frame(dates=mydates, day=weekdays(dates), value=myvalues)
dates day value
1 2010-05-29 Saturday 0.14576143
2 2010-05-30 Sunday 0.37669604
3 2010-05-31 Monday 0.74813943
4 2010-06-01 Tuesday
2011 Feb 04
1
read.table error
R experts,
I am working with a fairly large data set comprised of 563 rows by 116 columns including several
different modes. I have been unable to read in the data set completely using the read.table
function and the RGui (i.e. nearly half the total number of rows are missing from the data set
along with the column names). The data does read in fully using Tinn-R's Rterm;
however, at several
2010 Jul 15
2
How to plot a histogram of weekday frequencies in a list of dates?
Question from an [R] novice...
Hi,
I have a vector of date/times like the one shown below (a truncated
sample of a much longer list...)
> dates[1:4]
[1] "2006-03-16 08:41:00" "2006-03-16 10:28:00" "2006-03-16 11:03:00"
[4] "2006-03-16 11:04:00"
I would like to generate a weekday histogram showing the frequency of
dates falling on each weekday. I know
2008 Feb 27
1
Hmisc xYplot won't do conditioning on factors?
Hi,
I am trying to replace (lattice) standard xyplot with xYplot variant from
Hmisc package to be able to add error bars to my plots. However, this does
not work, e.g:
library(lattice)
d <- data.frame(
SKU=gl(3, 1, 21, labels=c("a", "b", "c")),
Weekday=gl(7, 3, 21),
QCRate=runif(21))
xyplot(QCRate ~ Weekday | SKU, data=d)
(this plots nice 3 panels as per
2012 Apr 22
2
difficulty in Formatting time series data
Dear R-Gurus
I have a data frame (from CSV file) which has its first column called Date.
The Date is in the format mm/dd/yyyy. I was trying to get the weekday for
these dates and I tried using wday() and day.of.week() functions and both
of them gave me precisely the wrong answers. I think the issue lies in the
proper formatting of dates. The class of this column is a factor class and
hence I
2012 May 11
1
summary for weekdays()
Hi all,
probably really simple: I seem to be lacking some understanding for the
character class: I have a bunch of dates in a dataframe and I want to add a
string variable with the weekday for each date. If I use something like
mydata$day <- weekdays (mydata$date), I can create subsets for each weekday
(eg mydata=="Monday"), but summary (mydata$day) doesn't count the instances
for
2011 Mar 06
2
Monte carlo help
Hello, I am currently doing my project and I need some help.
I am trying to schedule tutors for a study room where students come in and
out for helps. My goal is to schedule the tutors to maximally accomodate to
the flow of students that need help with math so that each tutor is given an
appropriate(also consecutive) hours of schedule. I am using monte carlo
simulation for this, however I have
2009 Dec 06
1
R ANOVA question
Hi All,
I'm fitting an intercept ANOVA model using R. I'm using following contrast
statement, so my first level is considered as base level.
options(contrasts = c("contr.treatment", "contr.treatment"))
My data has two factors are "Month" and "WeekDay". Due to default alphabetic
ordering, the Month(April) and WeekDay(Friday) are considered as base
2017 Jun 05
2
months not working with local language (weekdays does)
For what it's worth, I tried setting my Region | Formats setting to
Spanish (Peru) in Windows 10 Control Panel, and got Spanish weekday and
month results.
I believe on Windows we use the Microsoft C strftime function to produce
these strings, with the %A (for weekday) or %B (for month) formats. So
this question probably needs to be addressed to Microsoft.
Duncan Murdoch
On 05/06/2017
2010 May 17
6
Change order of columns in table?
I'm an R noob and have a (maybe) stupid question...
I have a table where I have the weekdays and a number for each weekday of
entries:
Thats what the table looks like...
Now I want to have an pie3D plot of this, but obviously the order of the
weekdays are not as one would expect...
Friday Monday Saturday Sunday Thursday Tuesday Wednesday
119 173 80
2017 Jun 05
0
months not working with local language (weekdays does)
Thank you Duncan and Rui for your time and interest in this issue.
Maybe it is a problem with Windows 7 and Spanish, and not Windows 10.
Let's wait for someone with the same enviroment, before assuming it's a
problem with my PC/configuration.
2017-06-05 14:37 GMT-05:00 Duncan Murdoch <murdoch.duncan at gmail.com>:
> For what it's worth, I tried setting my Region
2010 Mar 12
6
Randomly sampling subsets of dataframe variable
Fellow R users,
I am stumped on what would seem to be something fairly simple.
I have a dataframe that has a variable named 'WEEK' that takes
the numbers 1:26 (26 week time-period) with each number repeated
five times consecutively (once for each weekday, Monday through
Friday). Ex. 111112222233333.....2626262626. I would like to
randomly extract two weekdays per five day week for
2001 Sep 07
1
chron is.weekend() function
Hello,
I have a dataset which has fields giving both calendar date and weekday. I
know better functions are now available, but I am still using chron because
of the is.holiday() function and a homemade (even Heath Robinson would be
ashamed) is.daylight() function.
As a check for typos in the data input, I checked that the dates matched the
weekdays. I'm getting some confusing results
2010 Feb 01
3
merging data frames gives all NAs
Dear kind R helpers,
I have a vector of runway names in rwy ("31R", "31L",... the number is
user selectable)
arrgnd is a data frame with data for all flights and all runways, with a
Runway column.
I am trying to subset arrgnd into a dat frame for each selected runway,
and then combine them back together using the following code:
for (j in 1:nr) { # nr = number of
2007 Apr 09
1
help with ActiveRecord joins
I''m working on a fairly complex join query and could use a bit of advice
from more expert users of ActiveRecord.
I have an events table with quite a lot of data, with has_many relations
to categories, age_groups, and event_images. In my first naive
implementation, each event had a date, so to load all upcoming events
efficiently, I''d do:
Event.find(:all,
2003 Nov 02
2
Clearing Queue Stats?
Is there a way to clear the Queue stats?
That is with out restarting *?
I'd like to reset them daily and don't see a way
to do that.
Unless the only way is maybe a cron restart asterisk
like every weekday @ 04:00?