Displaying 20 results from an estimated 3000 matches similar to: "Changing the day of the month in a date"
2005 Dec 19
3
given a mid-month date, get the month-end date
I have a vector of dates.
I wish to find the month end date for each.
Any suggestions?
e.g.
For 12/15/05, I want 12/31/05,
For 10/15/1995, I want 10/31/1995, etc
__________________________________________________
[[alternative HTML version deleted]]
2010 Feb 23
2
Importing a file to r
Hello
I am trying to import the attached file Curva LIBOR to R. I am trying to use
the following commands and obtaining the following errors
> res <- read.xlsx("C:\\Users\\FELIPE
PARRA\\Documents\\Quantil\\Federacion\\Curva LIBOR.xlsx", 4)
Error en .jcall(rowCells[[ic]], "I", "getColumnIndex") :
RcallMethod: invalid object parameter
> res <-
2012 Sep 11
2
splines package
Hello all,
I have been working with b-splines and noted that the splines package is
not available in CRAN. Does any body know what happened with it?
Or, is there any package that replaces it?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2010 Nov 22
4
Rexcel
Hello I am new to RExcel and I would like to run a source code form the
excel worksheet. I would like to run the following code
source("C:\\Quantil Aplicativos\\Genercauca\\BackwardSelectionNC.r")
from the excel wroksheet. Does anybody know how to do this?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2010 Sep 26
4
Problem with unlist
Hello I want to unlist the attached element getting only the first element
in each element of the list. The last element of the list looks as this:
[[5065]]
[[5065]]$Pluv3Meses
[1] 274.4
[[5065]]$PluvMesesMedio
[1] 378.2667
[[5065]]$Pluv2UltimosMeses
[1] 23.33333
So I would like to get for each element of the list the element called
Pluv3Meses. The whole list has 5065 elements but when I try to
2010 Dec 15
6
Numbers in a string
Hello, I have stings which have all sort of characters (numbers, letters,
punctuation marks, etc) I would like to stay only with the numbers in them,
does somebody know how to do this?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2010 Sep 29
2
boxplot
Hello, does somebody know in a boxplot, what does each element in the
boxplot represent?
1. lines at the extremes of the dotted lines?
2. Extremes of the boxes
3. Black line in the middle of the box?
4. notches?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2011 May 14
2
changing the day of the week in dates format
Dear all,
I have a question related to the POSIXlt function in R.
I have a set of dates and times, for exmaple:
startx <- as.POSIXct("2011-01-01 00:00:00")
finx <- as.POSIXct("2011-12-31 00:00:00")
daysx<- seq(startx, finx, by="24 hours")
I
want to change the dates of all the days falling on a Saturday to the
next working day (i.e. Monday). So I
2011 Apr 09
1
Memory allocation problem
Hello, I am runnning a program on R with a "big" number of simulations and
I am getting the following error:
Error: no se puede ubicar un vector de tamaño 443.3 Mb
I don't understand why because when I check the memory status in my pc I get
the following:
> memory.size()
[1] 676.3
> memory.size(T)
[1] 1124.69
> memory.limit()
[1] 4000
which should in theory allow to
2008 Sep 18
1
Adding 1 month to a dataframe column
Dear R experts,
I have a problem in modifying one column of a dataframe with a datatime
format using a datetime operator.
Here is my dataframe A:
DATACONT PROVINCIA VALORE
1 2007-12-31 MI 1
2 2007-12-31 PV 2
3 2007-12-31 NA 3
4 2007-12-31 MI 4
5 2007-12-31 RM 5
6 2007-12-31 RM 6
7 2007-12-31 MI 7
8
2010 Nov 08
2
finding the last day of the month
Dear R Help,
I am trying to get fields showing the last day of each month for a monthly
closing project. In order to find the last day of the previous month, I
subtract the number of days from the current month. For all months my code
works; however, for October, my code doesn't work...it returns
2010-09-*29* instead
of 2010-09-*30*.
format(strptime("2010-10-31",
2007 Sep 27
1
converting numbers in "YYYYMM" format to last calendar day and last exchange trading day of the month
I have a vector that contains month and year in the format YYYYMM (e.g.“200701”, “200702”)
I wish to do to things:
1. I need to convert to a date that is the last calendar day of each month.
2. I need to convert this to a date that is the last U.S. stock-exchange trading day of each month.
Any advice is appreciated,
mymonths <- c(200701, 200702)
2010 May 12
3
Calling a list element
Hello, i have the following list
strsplit(as.character(Elecciones$Municipios),"\\.")
[[1]]
[1] "ANTIOQUIA" "ABEJORRAL"
[[2]]
[1] "META" "ACACIAS"
[[3]]
[1] "CASANARE" "AGUAZUL"
[[4]]
and I would like to make a vector of the first element of each of the list
items, in this case ANTIOQUIA, META, CASANARE, etc . Do you know how
2012 Jun 01
2
Day or Month difference between dates???
HI, R-Users:
I got a questions. have been struggling so long time....
I have this data:
> m1$Year_Month
201009 201010 201011 201101 201102
> min(m1$Year_Month)
201009
I want to calculate the following two answers, how do I program it?
> difference in Month?????
[1] 0 1 2 4 5
>difference in Days?????
0 31 61 ....
Thank you in advance!!!
Tammy
[[alternative
2013 May 15
1
Problem with convergence in optim
Hello to all,
I have been using an optim with the following call:
optim(param_ini,fun_errores2,Precio_mercado=Precio,anos_pagosE2=anos_pagos,control=list(maxit=10000,reltol=1e-16))
depending on the intial values I'm getting the same solution but once I get
the convergence message=10 (no convergence) and for the others I get
convergence message = 0
Solution1:
$par
beta1
2011 Mar 09
2
trunc function
Hello. I would like to know if there exists in R a function like trunc but
where i can choose how many decimal places can I stay with in the number I
have (sort of the same as the trunc function in excel). I would like, for
example if I have the number 0.974678 and I choose to stay with 3 decimal
places to have as ouput 0.974.
Thank you
Felipe Parra
[[alternative HTML version deleted]]
2006 Aug 10
2
day, month, year functions
Hi list,
I'm trying to turn a date into something productive. (Not what you may be thinking....)
I want three functions so I could take a "date" object and get the day of week, month, and year from it.
xx <- as.Date("2006-01-05")
month(xx) equal 1
day(xx) equal 5
year(xx) equal 2006
I'm aware of the weekdays() and months() functions in the base package. But
2009 Sep 13
3
How to get last day of a month?
Is there any R function to calculate automatically the last day of a
particular month? For example "sep2009" should be converted to last day of
September of 2009?
Thanks
--
View this message in context: http://www.nabble.com/How-to-get-last-day-of-a-month--tp25425645p25425645.html
Sent from the R help mailing list archive at Nabble.com.
2011 Mar 28
1
portfolioBacktest in fPortfolio
Hello. I am trying to use the portfolio backtesting function in fPortfolio
package, but I don't now why in my version of fPortfolio I don't have either
the portfolioBactest nor the portfolioBacktesting functions. Does anybody
knows what might be going on?
thank you
Felipe Parra
[[alternative HTML version deleted]]
2010 Apr 05
1
predict.lm
Hello I am trying to use predict.lm, but I am having trouble getting out of
sample predictions. I am getting the same output if I use the following
three commands:
predict(ModeloLineal,predictors[721:768,])
predict(ModeloLineal,predictors[1:768,])
predict(ModeloLineal)
where ModeloLineal is the output from ModeloLineal<-lm(dataTS[,6] ~
predictors[1:720,]), so the first 720 observations of