Learn R Programming

RcmdrPlugin.temis (version 0.6.1)

recodeTimeVarDlg: Recode Date/Time Variable

Description

Recode a date or time meta-data variable to create a new variable, for example in order to use larger time units (month, week...).

Arguments

code

NaN

describe

  • %aAbbreviated weekday name in the current locale. (Also matches full name.)
  • %AFull weekday name in the current locale. (Also matches abbreviated name.)
  • %bAbbreviated month name in the current locale. (Also matches full name.)
  • %BFull month name in the current locale. (Also matches abbreviated name.)
  • %dDay of the month as decimal number (01-31).
  • %HHours as decimal number (00-23).
  • %IHours as decimal number (01-12).
  • %mMonth as decimal number (01-12).
  • %MMinute as decimal number (00-59).
  • %UWeek of the year as decimal number (00-53) using Sunday as the first day 1 of the week (and typically with the first Sunday of the year as day 1 of week 1). The US convention.
  • %WWeek of the year as decimal number (00-53) using Monday as the first day 1 of the week (and typically with the first Monday of the year as day 1 of week 1). The UK convention.
  • %pAM/PM indicator in the locale. Used in conjunction with %I and not with %H.
  • %SSecond as decimal number (00-61).
  • %yYear without century (00-99).
  • %YYear with century.

dQuote

  • Time units
  • category

cr

  • Row percent corresponds to the part of chosen term's occurrences over all terms found in a given category (i.e., the sum of word counts of all documents from the category after processing) at each time point. This conceptually corresponds to line percents, except that only the columns of the document-term matrix that match the given terms are shown.
Column percent corresponds to the part of the chosen term's occurrences that appear in each of the documents from a given category at each time point. This measure corresponds to the strict definition of column percents. Absolute counts returns the relevant part of the document-term matrix, but summed for a given time point, and after grouping documents according to their category.

emph

after

Details

This dialog allows creating a new variable from a date or time variable, by specifying a new time format in which the values of the new variable will be expressed.

Typical use cases include:

  • Create a month variable from a full date:
{Use format %Y-%m to get four-digit year and two-digit month; or %y %B to get two-digits year and full month name.} Create a week variable from a full date:{Use format %U to get the week number in the year starting on Sunday, or %W for the week number in the year starting on Monday.} Create a date variable from a time variable:{Use format %Y-%m-%d to get four-digit year, two-digit month and two-digit day.}

See Also

setCorpusVariables, meta, zoo, xyplot, varTimeSeriesDlg, recodeTimeVarDlg