def get_rdataset(dataname, package='datasets', cache=False):
 data_base_url = (('https://raw.github.com/vincentarelbundock/Rdatasets/master/csv/' + package) + '/')
 docs_base_url = (('https://raw.github.com/vincentarelbundock/Rdatasets/master/doc/' + package) + '/rst/')
 cache = _get_cache(cache)
 (data, from_cache) = _get_data(data_base_url, dataname, cache)
 data = read_csv(data, index_col=0)
 data = _maybe_reset_index(data)
 title = _get_dataset_meta(dataname, package, cache)
 (doc, _) = _get_data(docs_base_url, dataname, cache, 'rst')
 return Dataset(data=data, __doc__=doc.read(), package=package, title=title, from_cache=from_cache)

def get_rdataset ( dataname , package = 'datasets' , cache = False ) : data_base_url = ( ( 'https://raw.github.com/vincentarelbundock/Rdatasets/master/csv/' + package ) + '/' ) docs_base_url = ( ( 'https://raw.github.com/vincentarelbundock/Rdatasets/master/doc/' + package ) + '/rst/' ) cache = _get_cache ( cache ) ( data , from_cache ) = _get_data ( data_base_url , dataname , cache ) data = read_csv ( data , index_col = 0 ) data = _maybe_reset_index ( data ) title = _get_dataset_meta ( dataname , package , cache ) ( doc , _ ) = _get_data ( docs_base_url , dataname , cache , 'rst' ) return Dataset ( data = data , __doc__ = doc . read ( ) , package = package , title = title , from_cache = from_cache )
download and return r dataset parameters dataname : str the name of the dataset you want to download package : str the package in which the dataset is found .