add_presentation: Create or add to a 'semnar' object

View source: R/add_presentation.R

add_presentationR Documentation

Create or add to a semnar object

Description

Create or add to a semnar object

Usage

add_presentation(
  object,
  presenter = NA,
  presenter_name = NA,
  presenter_midname = NA,
  presenter_surname = NA,
  presenter_affiliation = NA,
  presenter_email = NA,
  presenter_link = NA,
  presenter_address = NA,
  country = NA,
  city = NA,
  state = NA,
  lon = NA,
  lat = NA,
  event = NA,
  title = NA,
  abstract = NA,
  type = NA,
  link = NA,
  materials = NA,
  institution = NA,
  department = NA,
  school = NA,
  venue = NA,
  address = NA,
  postcode = NA,
  room = NA,
  start = NA,
  end = NA,
  year = NA,
  month = NA,
  day = NA,
  start_hour = NA,
  end_hour = start_hour,
  start_min = 0L,
  end_min = start_min,
  start_sec = 0L,
  end_sec = 0L,
  tag = NA,
  tz = "UTC"
)

Arguments

object

either an object an object of class semnar or unspecified (default). See Details.

presenter

either NA (default) or an object of class semnar_presenter. In the latter case, all input to the presenter_* arguments below is ignored and populated according to the supplied object.

presenter_name

name of the presenter of the presentation; character string or NA (default).

presenter_midname

middle name of the presenter of the presentation; character string or NA (default).

presenter_surname

surname of the presenter of the presentation; character string or NA (default).

presenter_affiliation

affiliation of the presenter of the presentation; character string or NA (default).

presenter_email

email of the presenter of the presentation; character string or NA (default).

presenter_link

link to the webpage of the presenter of the presentation; character string or NA (default).

presenter_address

address of the presenter; character string or NA (default).

country

country where the presentation took place; character string or NA (default).

city

city where the presentation took place; character string or NA (default).

state

state where the presentation took place; character string or NA (default).

lon

longitude of the venue of the presentation; numeric or NA (default).

lat

latitude of the venue of the presentation; numeric or NA (default).

event

either NA (default) or a character string with the name of the event at which the presentation is/was given or an object of class semnar_event. In the latter case, all input to country, city, state, lon, lat, link, institution, department, school, venue, address, postcode is ignored and populated according to the supplied object.

title

title of the presentation; character string or NA (default).

abstract

abstract of the presentation; character string or NA (default).

type

the type of the talk. Available options are NA (default), "seminar", "webinar", "lecture", "presentation", "talk", "poster".

link

link to the event or seminar/talk page; character string or NA (default).

materials

link to the slides or materials from the seminar/talk; character string or NA (default).

institution

institution at which the event or seminar/talk page took/will take space; character string or NA (default).

department

department at which the event or seminar/talk page took/will take space; character string or NA (default).

school

school at which the event or seminar/talk page took/will take space; character string or NA (default).

venue

venue at which the event or seminar/talk page took/will take space; character string or NA (default).

address

address where the seminar/talk took place; character string or NA (default).

postcode

post code where the seminar/talk took place; character string or NA (default).

room

room at which the event or seminar/talk page took/will take space; character string or NA (default).

start

NA (default) or a character string to be parsed into a calendar date and time using parsedate::parse_date(). If the latter, start overrides any input in year, month, day, start_hour, start_min, start_sec

end

NA (default) or a character string to be parsed into a calendar date and time using parsedate::parse_date(). If the latter, end overrides any input in year, month, day, end_hour, end_min, end_sec.

year

year of the presentation; numeric, e.g. 2019, or NA (default).

month

month of the presentation; numeric (1-12) or NA (default).

day

day of the presentation; numeric (1-31) or NA (default).

start_hour

start hour of the presentation; numeric (1-24) or NA (default).

end_hour

end hour of the presentation; numeric (1-24) or NA (default).

start_min

start minute of the presentation; numeric (0-60) or NA (default).

end_min

end minute of the presentation; numeric (0-60) or NA (default).

start_sec

start second of the presentation; numeric (0-60) or NA (default).

end_sec

end second of the presentation; numeric (0-60) or NA (default).

tag

a tag for the presentation; character string or NA (default).

tz

timezone. Default is "UTC". See DateTimeClasses for details.

Details

If object is not specified then add_presentation() will create an semnar object based on the supplied inputs, otherwise it will add the details of the new presentation on object.

If the start date and end date are specified (either through start and end or through year, month, day) and no information is provided or can be inferred about start/end times, then a time of 0 hours, 0 minutes and 0 seconds is assumed.

An error is thrown if the start date/time is after the end date/time.

Value

A structured data.frame() that also inherits from class semnar, including the supplied presentation details.

See Also

presenter() plot.semnar() shorten_url() guess_address()

Examples

# Two of my past talks


out <- add_presentation(country = "England", city = "Coventry",
                        lon = -1.560843, lat = 52.384019,
                        event = "Young Researchers' Meeting",
                        title = "A workflow that most probably isn't yours",
                        link = "https://warwick.ac.uk/fac/sci/statistics/news/yrm/",
                        materials = "https://ikosmidis.com/files/ikosmidis_YRM_2019.pdf",
                        type = "presentation", institution = "University of Warwick",
                        department = "Department of Statistics",
                        venue = "Mathematical Sciences Building", room = "M1.02",
                        year = 2019, month = 5, day = 28,
                        start_hour = 16, start_min = 00,
                        end_hour = 17, end_min = 00) |>
        add_presentation(country = "United States", city = "Stanford",
                         lon = -122.165330, lat = 37.429464,
                         event = "useR! 2016",
                         title = "brglm: Reduced-bias inference in generalized linear models",
                         link = "https://user2016.r-project.org//files/abs-book.pdf",
                         materials = "https://bit.ly/2KCBbKg",
                         type = "presentation", institution = NA, department = NA,
                         venue = "Stanford Institute for Economic Policy Research",
                         room = "Siepr 120",
                         year = 2016, month = 06, day = 29,
                         start_hour = 14, start_min = 15,
                         end_hour = 14, end_min = 35)
out


semnar documentation built on Nov. 3, 2022, 5:06 p.m.