Helpful functions used in my courses

automatic.type.conversion | Try to transform a vector or columns that are stored as... |

clone.list | #Set and retrieve global options for restore points # # |

cluster.vcov | R function for computing two-way cluster-robust standard... |

copy.into.env | #Restore stored objects by copying them into the global... |

currentenv | Get the environment in which this function is called |

dyplot | Dynamic time series plots (wrapper to dygraph) |

eval.string.dplyr | Internal function used by s_filter, s_select etc. |

explore.3d.fun | Uses Manipulate to explore the function z.fun |

explore.image | Uses Manipulate to interactively change some parameters of an... |

get.coef.and.se | Returns estimated coefficients and standard errors from a... |

is.false | Checks whether val is FALSE, NULL return FALSE If val is a... |

is.true | Checks whether val is TRUE, NULL return FALSE If val is a... |

ivregress | An extended version of ivreg from AER that allows robust... |

make.date.time | Builds a date time object from different components |

matrix.to.grid | Convert data in matrix format to grid format with key columns... |

named | Set specified names for x and return the named object |

nc | Creates a vector that is named by the names of its arguments |

nlist | Creates a list that is named by the names of its arguments |

plot.with.legend | Draws a base plot with a legend to the right, must play... |

print.WuHausmanTest | This function will be called when the results of a... |

quick.by | Quick version of by using internally data.table |

quick.df | A function that generates a data.frame more quickly from... |

remove.global.variables | Remove all global variables (not functions) |

robust.se | Computes robust standard errors for the coefficients of a... |

run.scenarios | A helper function to simulate different scenarios. So far the... |

s_arrange | Modified version of dplyr's arrange that uses string... |

s_filter | Modified version of dplyr's filter that uses string arguments |

s_group_by | Modified version of dplyr's group_by that uses string... |

simulation.study | A helper function to conduct a simulation study for different... |

skMotionChart | Convenience interface to gvisMotionChart that transforms... |

s_mutate | Modified version of dplyr's arrange that uses string... |

s_select | Modified version of dplyr's select that uses string arguments |

s_summarise | Modified version of dplyr's summarise that uses string... |

subst.expr | Substitute some pattern by a list of alternatives |

to.date.time | Try to convert a character object to a date time object,... |

to.xts | Transform a data from to an xts object |

transform.for.growth.analysis | Transform data set for analysis in growth regressions |

vcov.lm.fit | Returns the variance-covariance matrix from the return values... |

view.stata.var | Views variable labels of a data.frame loaded with read.dta |

with.random.seed | Evalutes the expression expr with the specified random seed.... |

wu.hausman.test | A Wu-Hausman Test for a single endogenous variable |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.