Displaying 20 results from an estimated 10000 matches similar to: "extract week from date"
2002 Jun 11
3
show messages during a long process
Hi,
I have a function which takes some time to execute (20 sec.) and I want to
show the progress of the execution with simple messages such as "10% done",
"20% done", ... (with a simple "cat" function). The problem is that all the
messages appear together when the execution of the function is over. How can
I show each message at their corresponding time?
Thanks,
2002 Sep 23
3
Problems with tcltk package
Hello listers,
I have installed Tcl/Tk v8.4 on my system (Win XP, R 1.5.1). When I try to
load the Tcl/Tk package I get this error:
> library(tcltk)
Error in firstlib(which.lib.loc, package) :
TCL_LIBRARY is not set
Error in library(tcltk) : .First.lib failed
Can someone help me, please?
Thanks,
Juan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2002 May 03
6
problems with rexp ?
Does anyone know if R have any problems with the exponential random number
generation (function rexp)?
I comment it because I executed
data<-sort(rexp(100))
plot(data,dexp(data)/(1-pexp(data)),type="l")
and the graphic isn't constant.
(Note: exponential distribution have a constant hazard failure rate).
Thank you,
Juan
2002 Jun 10
3
%in% in R?
Hi,
Does anyone know if exists a similar funcion to %in% from Hmisc S-plus
library in R?
Thank you
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
2002 Jun 18
5
insert number in vector
Hello R-users,
I need to create a vector inserting an 1 after each value of another vector.
For example:
vec1<-c(2,3,4)
I need to create a vector with the values 2,1,3,1,4
Does anyone know how create this vector without loops (vec1 could have 1000
elements)
Thank you,
Juan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2005 Feb 10
1
rats in survival package
Dear R-listers,
Does anybody know what is the correct source of "rats" dataset in survival package?
The help gives the following information:
Rat data from survival5
Description:
48 rats were injected with a carcinogen, and then randomized to
either drug or placebo. The number of tumors ranges from 0 to 13;
all rats were censored at 6 months after randomization.
2003 Oct 01
1
Acces violation ???
Dear R-listers,
I have created a "dll" and I call it from a R function. However R stops and
shows the message:
"Unhandled exception in Rgui.exe (R.DLL): 0xC0000005: Access Violation"
I get this error in other situations and I solved it verifying that all
parameters are called fine. (e.g., double precision -> as.double, integer ->
as.integer,...). I have verify this.
2003 Jan 14
2
graphics landscape orientation
Hello listers,
I would like to know how I can get the resulting graphic of the function
plot.hclust (from the package cluster) in landscape orientation. Is it
possible?
Thanks,
Juan
2002 Jun 19
2
problem with boot
Hello R-users,
I'm using the boot's library. I have two questions:
1. I execute for example
data<-rnorm(100)
boot(data,mean,500)
and I obtain 500 equal bootstrap samples of data. Why?
2. I need to calculate the bootstrap confidence intervals for a statistic,
but when I use the function boot.ci it shows the error message:
Error in if
2003 Jan 17
1
problems writing graphics
Hello R-listers,
I am developing a function which needs to create jpeg files from some plots. To create the jpeg files I use the instruction dev.print(jpeg, file=c://graph.jpg",width=400,height=400). Until now everything has been fine, but now I have a special plot which is formed by 3 separate plots joined with the instruction "layout":
nf <-
2002 Jan 21
1
.Fortran or .C???
Hello,
I have made a dll with mingw32 fortran compiler. I load my dll with the dyn.load function, but when I call one of my Fortran procedures with the .Fortran instruction, an error message appears saying that my function is not in the load table. However, if I call my Fortran routines with ".C" it works fine. I would like to know what is happening here. Is it usual to call Fortran
2011 Feb 19
1
problem in plotting numeric x by POSIXt class with lattice
# hi all,
# I'm trying to plot temperatures by date in a trellis plot by their
stations
# I'm plotting the following data.frame
library(lattice)
h <- structure(list(station_name = structure(c(3L, 4L, 2L, 10L, 11L,
12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L,
8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L), .Label = c("Ashqelon",
"Beer Sheva",
2010 Aug 01
1
aggregating a daily zoo object to a weekly zoo object
Dear R People:
I'm trying to convert a daily zoo object to a weekly zoo object:
xdate <- seq(as.Date("2002-01-01"),as.Date("2010-07-10"),by="day")
library(zoo)
length(xdate)
xt <- zoo(rnorm(3113),order=xdate)
xdat2 <- seq(index(xt)[1],index(xt)[3113],by="week")
xt.w <- aggregate(xt,by=xdat2,mean)
Error: length(time(x)) ==
2008 Dec 11
3
getting ISO week
Hi all,
Is there a simple function already implemented for getting the ISO
weeks of a Date object?
I couldn't find one, and so wrote my own function to do it, but would
appreciate a pointer to the "default" way. If a function is not yet
implemented, could the code below be of interest to submit to CRAN?
Best Regards,
Gustaf
--------------------
2009 Mar 25
1
Creating date seq in data frame
Hi,
I have the following type of data:
myData <- data.frame(x = 1:5, y = letters[1:5], xDate =
seq(as.Date("2001/2/1"), as.Date("2005/2/1"), by="year") )
> myData
x y xDate
1 a 2001-02-01
2 b 2002-02-01
3 c 2003-02-01
4 d 2004-02-01
5 e 2005-02-01
What I need is a new column, say xDate2, that for each xDate (or for each
unique combination of
2010 Jul 29
2
multiple graphics windows open
Dear R People:
Now I have a function with 3 graphics windows. I'd like for them all
to be visible. However, the first window goes blank. Here is the
basic setup. The first plot is the entire series. The user selects
two points, which in turns generates a subset plot and an EWMA subset
plot. Finally, if things worked right, the user should be able to
click on "Tile Vertically"
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 <-
2023 Jun 11
1
Resumen de R-help-es, Vol 172, Envío 16
Javier, no s? si es esto lo que buscas.
Te copio una l?nea de uno de mis scripts. En el eje X, van los a?os desde 1990 a 2022, pero solo salen los a?os 90, 95, ... y el resto solo la marca secundaria sin el a?o
scale_x_continuous(breaks = seq(1990, 2022, by = 1),
labels = c(1990, rep("", 4), 1995, rep("", 4), 2000, rep("", 4),
2019 Apr 05
3
Orientación para hacer un sitio web con R
Hola,
Como te comentan, shiny es la mejor opción que tienes, solo añadir que no
necesitas Rstudio connect. Se puede hacer el volcado de datos con
conexiones ODBC perfectamente, hay varios paquetes de R que te sirven para
ello. Lo que si es cierto es que necesitarás dedicarle un tiempo a cómo
utilizarlos de manera razonable, probableente tendrás que pelear un poco
para configurarlos correctamente.
2012 Jun 11
0
4as Jornadas (Barcelona): ¿quieres echar una mano?
Hola:
Por si no os ha llegado por otras vías, os informo que se están gestando
las próximas (¡las 4as!) Jornadas de Usuarios de R en Castellano. Ved
el mensaje más abajo de Juan Ramón González.
En breve, los que queráis echar una mano, hacer sugerencias, etc. ,
podéis hacerlo en el foro que se ha creado en la web de la comunidad
(hay gente que no está - aún - en esta lista, etc):