Displaying 20 results from an estimated 10000 matches similar to: "reformat time from hhmm"
2012 Nov 28
2
hhmm time format, strptime and %k
Hello,
I am having trouble with the conversion specifications as described in
the strptime help page.
> head(dat)
Date Time Open High Low Close Up Down Volume
1 11/19/2012 935 137.89 138.06 137.82 138.05 3202541 3013215 0
2 11/19/2012 940 138.04 138.40 138.02 138.38 2549660 2107595 4657255
3 11/19/2012 945 138.38 138.40 138.18 138.19 1627379 1856318 3483697
4
2006 Oct 20
1
How to evaluate a Variable Name?
Hi,
I have a dataframe Wash2005, which has daily weather data. I am doing a
regression by month as follows:
# FM10 Regression by Month
# Plot 12 Month of OFM10, FFM10
for(i in 1:12) {
Temp <- subset (Wash2005, MM == i)
assign( paste('Wash2005FM10', strtrim(month.name[i],3),
sep=""),lm(Temp$FM10.1 ~ Temp$FM10))
}
Wash2005FM10Jan, Wash2005FM10Feb, etc holds the
2011 Nov 17
1
how to read a free text file into individual variables
hi ,I am writing a soft package based on R.
But when I try to read a configure file showed as below.
How can I read the parameter in this text file.
How can I read the parameter into each variable in this file ?
configinfo<-scan(file(configfile),ok=TRUE,n=-1)
scan seems need every line have same column ?
configinfo <- readLines(configfile,ok=TRUE,n=-1)
methodnum <-
2013 Mar 07
8
Convertir eh hora
Hola a tod@s,
Me han mandado una base de datos y al abrirla me he encontrado con la fecha y la hora en el siguiente formato:
FECHA HORA
20121007 1206
20110622 1854
20110623 054
He conseguido que la Fecha me quedara en el formato dd/mm/aaaa mediante el script
db[, "FECHA"] <- as.Date(as.character(db[,
2007 Aug 06
4
Function for trim blanks from a string(s)?
I feel like an idiot posting this because every language I've ever seen has a
string function that trims blanks off strings (off the front or back or
both). Ideally, it would process whole data frames/matrices etc but I don't
even see one that processes a single string. But I've searched and I don't
even see that. There's a strtrim function but it does something completely
2010 Mar 25
1
*** caught segfault *** address 0x18, cause 'memory not mapped'
Hello R Community,
I've been run the following codes. However, I've been getting an
unusual segfault
that I'm unable to trace its origin. Please give me a light to
decipher the "caught segfault"
Thanks for you attention.
Bernardo.
> options(STERM='iESS', editor='emacsclient')
> rm(list = ls())
> > source("fgenIGLD.R") #RNG
2014 Sep 08
3
problema con los cambios de marcas temporales en el eje X
Hola de nuevo, acabo de encontrar la solución. He creado una variable ficticia con los días 1 de cada mes en la secuencia temporal que quería y después he actuado de la siguiente manera
attach(Libro1)
plot (xbar~as.Date(fecha,"%d/%m/%y"), type="b", pch=19,cex=2,xaxt="n")
xlabels<-strptime(ofeje, format = "%d/%m/%y")
axis.Date(1,
2009 Oct 05
6
Date-Time-Stamp input method for user-specific formats
Date-Time-Stamp input method to correctly interpret user-specific
formats:coding is 90% there - based on exmple at
http://tolstoy.newcastle.edu.au/R/help/05/02/12003.html
...anyone got the last 10% please?
CONTEXT:
Data is received where one of the columns is a datetimestamp. At midnight,
the value represented as text in this column consists of just the date part,
e.g.
2011 Sep 29
2
String manipulation with regexpr, got to be a better way
Help-Rs,
I'm doing some string manipulation in a file where I converted a string date in mm/dd/yyyy format and returned the date yyyy.
I've used regexpr (hat tip to Gabor G for a very nice earlier post on this function) in steps (I've un-nested the code and provided it and an example of what I did below. My question is: is there a more efficient way to do this. Specifically is
2009 Mar 13
2
Using format to add leading zeroes
I have a numerical vector which contains a (poorly) formatted time
column, which, in theory, should be HHMM, but was distributed as an
integer, so, for 12:15 am, it is saved as "15" (e.g. HHMM = 0015 with
the zeroes stripped). I'm trying to use this in conjunction with
strptime, but I'm thinking because each time is an integer ranging from
1 to 4 digits, I probably need to
2009 Nov 02
5
Optimizar código
Hola lista, tengo una base de datos muy grande de un datalogger.
Consiste en un vector con 0's y 1's, y tengo que ver cuando hay 600 o
más unos seguidos. Se me ocurrió hacerlo con un loop for. Pero tarda
demasiado. También intente usar which para que seleccione solo los 1
para empezar a sumar pero no hay gran diferencia. A alguien se le
ocurre alguna solución para hacerlo más rápido?
Acá
2006 Nov 16
6
Gantt chart problem after upgrade to R 2.4.0
I am having a problem with a gantt chart since
moving to R2.4.0. from 2.3.1
I made some adaptations to the code from
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=74
and successful produced a simple gantt chart. However
when I upgraded to 2.4.0 it no longer works as
desired. See
http://ca.geocities.com/jrkrideau/R/gantproblem.pdf
for the two charts. The charts were produced
2003 Feb 13
5
ESRI shape file import and time-space models
Dear R user,
I am running R under Windows 2000.
I am looking for a routine for importing
- shape files (ESRI) into R
- dbase files (FOXPRO) into R
and I am looking for time-space models for description and prediction of
Bernoulli-, Binomial- and Poissonvaraibles.
Thank's a lot for a reply.
Sincerely yours,
Ekkehardt Altpeter
Swiss Federal Office of Public
2011 Nov 17
2
how to read a freetext line ?
hi everyone .
Here I have a text where there are some integer and string variables.But I
can not read them by readLines and scan
the text is :
weight ;30;130
food:2;1;12
color:white;black
the first column is the names of the variables and others are the value of
them.
the column in different line are different.
Can anyone help me ?
--
TANG Jie
Email: totangjie@gmail.com
Tel: 0086-2154896104
2016 Mar 11
2
Regression in strptime
This is definitely obscure but we had a unit test that called
.Internal(strptime, "1942/01/01", %Y/%m/%d") with timezone (TZ) set to
CET. In R-3.1.3 that returned "1942-01-01 CEST" which, paradoxically, is
correct as they evidently did strange things in Germany during the war
period. Java also returns the same. However, R-3.2.4 returns "1942-01-01
CET".
2016 Mar 12
2
Regression in strptime
On 3/12/16 12:33 AM, peter dalgaard wrote:
>> On 12 Mar 2016, at 00:05 , Mick Jordan <mick.jordan at oracle.com> wrote:
>>
>> This is definitely obscure but we had a unit test that called .Internal(strptime, "1942/01/01", %Y/%m/%d") with timezone (TZ) set to CET.
> Umm, that doesn't even parse. And fixing the typo, it doesn't run:
>
>>
2023 Nov 06
2
strptime with +03:00 zone designator
>>>>> Richard O'Keefe
>>>>> on Mon, 6 Nov 2023 18:37:34 +1300 writes:
> Thanks to all who replied. On Mon, 6 Nov 2023 at 18:37,
> Richard O'Keefe <raoknz at gmail.com> wrote:
>> OK, so the consensus is (1) One cannot make strptime
>> accept ISO8601-compliant zone designators (2) The
>> lubridate package
2016 Mar 15
4
Regression in strptime
>>>>> peter dalgaard <pdalgd at gmail.com>
>>>>> on Sat, 12 Mar 2016 19:11:40 +0100 writes:
> OK, .Internal is not necessary to reproduce oddity in this area. I also see things like (notice 1980)
>> strptime(paste0(sample(1900:1999,80,replace=TRUE),"/01/01"), "%Y/%m/%d", tz="CET")
...............
>
2011 Sep 14
3
make check reg-tests-1b.R fails with Ubuntu R
Today I built R from source on a 32-bit Ubuntu 10.04.3 LTS box, and
saw that the "make check" tests/reg-tests-1b.R failed. From the
output at the end of my "tests/reg-tests-1b.Rout.fail" file, the
problem is appearing in the "identical(z, x %*% t(y))" test code
below.
I then tried the stock R provided by the Ubuntu r-base-core binary
package, and to my surprise, it
2010 Feb 23
1
Problem with strptime generating missing values where none appear to exist
Dear R Helpers,
I am having difficulty with strptime. I wish to find the differences between
two vectors of times. I have apparently no difficulty to convert the vectors
to the appropriate format using strptime. But, then difftime does not
calculate all the differences.
Here is the code and output:-
dob=strptime(as.character(datx$BDT),'%d-%b-%y'); dob$year=dob$year-100