Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

timetaken() could have more formatting options

Aperta
#7,708 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
r
Ambito
data

Direzione di ricerca

Use timetaken() as the entry point and inspect its implementation and nearby usage examples first. Define formatting options that can omit the CPU portion and/or the word "elapsed", while preserving the existing short- and long-duration formats; done means the requested output variants are supported.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

timetaken is very handy function for formatting time taken in R code. It is currently limited to one type of format:

t0 = proc.time()
Sys.sleep(5)
timetaken(t0)
#[1] "5.007s elapsed (0.060s cpu)"

# then when something takes much longer
#[1] "01:01:33 elapsed (01:00:01 cpu)"

I would like to be able to tweak its format.
For example I would like to skip "cpu" time: "5.007s elapsed" / "01:01:33 elapsed"
Or skip elapsed word as well: "5.007s" / "01:01:33"

Lingua principale
R
Stelle
3.9k
Fork
1.1k
Merge medio
8m
PR unite (30g)
2

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Rdatatable/data.table

Tutte le issue di Rdatatable/data.table

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.