search for: monthly

Displaying 20 results from an estimated 23997 matches for "monthly".

2007 Jun 13
5
Confusion with sapply
Hi, I have some confusion in applying a function over a column. Here's my function. I just need to shift non-March month-ends to March month-ends. Initially I tried seq.dates, but one cannot give a negative increment (decrement) here. return(as.Date(seq.dates(format(xdate,"%m/%d/%Y"),by="months",len=4)[4]) ) Hence this simple function: > mydate <-
2010 Mar 26
3
Help with assigning a value based on existing numbers
Hi All I have a column/variable called time difference. It has a whole list of numbers from 0 through to the hundreds eg 236. I want to assign a corresponding "name" to each variable from a predefined list: Month or less, 1 -2 months, 2-3 months etc So the result would look something like: Time Difference Month 1 Month or
2011 Jun 02
2
shading in overlap between two ranges
I have 2 datafiles 'target' and 'observed' as shown below (I will gladly email these 2 small files to whomever). X25. And X75. Indicate the value of 25th and 75th-percentile of the target ('what should be') and the observed ('what is'). The i.value is simply the month. > target X i.value X25. X75. 1 one.month 1 10.845225 17.87237 2
2010 Jul 23
1
Error produced by read.zoo: "bad entries"
Hello! I have a data set similar to the data set "monthly" in the example below: monthly<-data.frame(month=c(20090301,20090401,20090501,20100301,20100401,20090301,20090401,20090501,20100301,20100401),monthly.value=c(100,200,300,101,201,10,20,30,11,21),market=c("Market A","Market A", "Market A","Market A", &...
2009 Mar 04
10
total per user
...t not by user. Here is my code in the controller: def index @users = User.find :all, :order => ''name ASC'' @deal_groups = Deal.find(:all).group_by {|t| t.saledate.at_beginning_of_month} end And then the code in the View <% for user in @users %> <ul id="monthly-revs"> <strong><li><%=h Time.now.year %></li></strong> <% user.deal_groups.keys.sort.each do |month| %> <li><%=h month.strftime(''%B'') %></li> <li><%=h number_to_currency(user.deal_groups[month].colle...
2010 Oct 13
3
Matrix subscripting to wrap around from end to start of row
Perhaps it is just that I don't even know the correct term to search for, but I can find nothing that explains how to wrap around from the end to a start of a row in a matrix. For example, you have a matrix of 2 years of data, where rows are years, and columns are months. month.data = matrix(c(3,4,6,8,12,90,5,14,22, 8), nrow = 2, ncol=5) I would like to take the average of months 5:1 for
2012 Dec 17
3
mean of each month in data
...12 AVERAGE OF MONTH 12 AVERAGE OF MONTH 12 AVERAGE OF MONTH 12 similar operation are to be done for "Sa" and the remaining 67 stations... which means i want to have 69 matrices, in which each column (number of columns should be equal to number of years of data) should contain 12 mean monthly values of population of each year. thanks in advance eliza -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: index.G2.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121217/c4835bd2/attachment-0002.txt>
2007 Sep 11
2
Function to get a sequence of months
Hi all, I am looking for a function for following calculation. start.month = "July" end.month = "January" months = f(start.month, end.month, by=1) * f is the function that I am looking for. Actually I want to get months = c("July", "August",.............."January") If start.month = 6 and end.month = 1 then I could use (not properly) seq()
2009 Jun 02
3
montly mean temp plot
Dear all i got a problem in monthly mean temperature. here i am attaching the data set as well as the plot i got with the following command plot(month,type='n') plot(month,X1999) this command gave the plot where the month names are in alphabetic order, i want the plot in monthly sequence could you please suggest me how can i...
2017 Apr 12
3
"table(droplevels(aq)$Month)" in manual page of droplevels
The last line of the example in droplevels' manual page seems to be incorrect to me. I think it should read: "table(droplevels(aq$Month))". Amazingly (I don't understand) both variants seem to produce the same result (R 3.3.3): --- > aq <- transform(airquality, Month = factor(Month, labels = month.abb[5:9])) > aq <- subset(aq, Month != "Jul") >
2010 Apr 12
1
N'th of month working day problem
...earch<risk2009@ath.forthnet.gr> wrote: > >> Dear all, >> >> Some time ago I received some very kind help (special thanks to Gabor) to >> construct a function that isolates the n'th working day of each month for >> zoo object (time series) to create monthly data from daily observations. >> >> I found out that the code works fine except for the 29 till 31st dates of >> each month as it skips some months (February for example). >> >> If you could help me isolate the problem I would be grateful as I can not >> find a...
2011 May 27
2
help with barplot
Hi, I'm really struggling with barplot I have a data.frame with 3 columns. The first column represents an "incident" type The second column represents a "month" The third column represents a "time" Code for a sample data.frame incidents <- rep(c('a','b','d','e'), each =25) months <- rep(c(1,2), each =10) times
2013 Jun 15
2
Plotting two y-axis vs non-numeric x-axis
Hi dear all, the following code is correct. but I want to use non-numeric x-axis, for example if I replace time <- seq(0,72,6) by month <- c("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Pag") Ofcourse I use factor(month) instead of
2009 Jun 25
4
Using by() and stacking back sub-data frames to one data frame
Dear all, I have a code where I subset a data frame to match entries within levels of an factor (actually, the full script uses three difference factors do do that). I'm very happy with the precision with which I can work with R, but since I loop over factor levels, and the data frame is big, the process is slow. So I've been trying to speed up the process using by(), but I got stuck at
2006 Feb 28
5
Getting number of days in a month
In PHP, there was an argument you could pass to the Date function to get the number of days in the current month: echo date("t"); // Outputs "28" for February I don''t see anything like this in Ruby/Rails. Right now, I''m using a very ugly line to pull the last day of the month: @number_of_days = (Date.strptime(Date.today.strftime("%Y-%m-01"))
2008 Dec 01
3
Failure to subset in R v 2.8.0
Hello, I've been using a pre-release version of R v 2.8.0 for Windows for the last couple months. I think that there have been consistent problems with subsetting data sets, but I had usually been able to find work-arounds or was unable to confirm this as a bug. I think now I have, and would love advice on what to do if I've made some error. The data set in question ("c") has
2006 Jan 16
8
[newbie] This Month / Next Month / The One After That
What I want to do is simple. I''d like code that prints out the name of this month (January) the next month (February) and the one after that (March) I''ve been able to print this month: <% t = Time.now %> <%= t.strftime(" This Month is: %B") %> But I can''t figure out how to get the next months to print out! -- Posted via
2005 Oct 11
6
adding 1 month to a date
Within an R dataset, I have a date field called “date_”. (The dates are in the format “YYYY-MM-DD”, e.g. “1995-12-01”.) How can I add or subtract “1 month” from this date, to get “1996-01-01” or “ “1995-11-01”. --------------------------------- [[alternative HTML version deleted]]
2007 May 10
3
Getting the last day of the month.
Hi, Given a date, how do I get the last date of that month? I have data in the form YYYYMM, that I've read as a date using > x$Date <- as.Date(ISOdate(substr(x$YearEnd,1,4),substr(x$YearEnd,5,6),1)) But this gives the first day of the month. To get the last day of the month, I tried > as.Date(as.yearmon(x$Date,frac=0)) But I don't get the last day of the month here. (Tried
2007 May 08
3
plotting a point graph with data in X-axis
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070508/1c7def0a/attachment.pl