r-faq

How do I get a list of built-in data sets in R?

喜欢而已 提交于 2020-05-22 13:34:01
问题 Can someone please help how to get the list of built-in data sets and their dependency packages? 回答1: There are several ways to find the included datasets in R: 1: Using data() will give you a list of the datasets of all loaded packages (and not only the ones from the datasets package); the datasets are ordered by package 2: Using data(package = .packages(all.available = TRUE)) will give you a list of all datasets in the available packages on your computer (i.e. also the not-loaded ones) 3:

How should I deal with “'someFunction' is not an exported object from 'namespace:somePackage'” error? [closed]

二次信任 提交于 2020-05-17 09:50:14
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . I have this error: 'someFunction' is not an exported object from 'namespace:somePackage' Does anyone know how to solve it? 回答1: Some reasons: Function is not part of the package, anymore, try ??someFunction to find out which package it belongs to. Package data is not part of the package Function is

How should I deal with “'someFunction' is not an exported object from 'namespace:somePackage'” error? [closed]

邮差的信 提交于 2020-03-25 21:39:47
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 days ago . I have this error: 'someFunction' is not an exported object from 'namespace:somePackage' Does anyone know how to solve it? 回答1: Some reasons: Function is not part of the package, anymore, try ??someFunction to find out which package it belongs to. Package data is not part of the package Function is available in

How should I deal with “'someFunction' is not an exported object from 'namespace:somePackage'” error? [closed]

谁说我不能喝 提交于 2020-03-25 21:39:46
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 days ago . I have this error: 'someFunction' is not an exported object from 'namespace:somePackage' Does anyone know how to solve it? 回答1: Some reasons: Function is not part of the package, anymore, try ??someFunction to find out which package it belongs to. Package data is not part of the package Function is available in

How should I deal with “'someFunction' is not an exported object from 'namespace:somePackage'” error?

回眸只為那壹抹淺笑 提交于 2020-03-07 05:30:53
问题 I have this error: 'someFunction' is not an exported object from 'namespace:somePackage' Does anyone know how to solve it? 回答1: Some reasons: Function is not part of the package, anymore, try ??someFunction to find out which package it belongs to. Package data is not part of the package Function is available in newer version of the package, reinstall latest version. See also these questions referring to specific instances of this problem: Error: 'use_package' is not an exported object from

How should I deal with “'someFunction' is not an exported object from 'namespace:somePackage'” error?

我与影子孤独终老i 提交于 2020-03-05 04:15:47
问题 I have this error: 'someFunction' is not an exported object from 'namespace:somePackage' Does anyone know how to solve it? 回答1: Some reasons: Function is not part of the package, anymore, try ??someFunction to find out which package it belongs to. Package data is not part of the package Function is available in newer version of the package, reinstall latest version. See also these questions referring to specific instances of this problem: Error: 'use_package' is not an exported object from

How should I deal with “'someFunction' is not an exported object from 'namespace:somePackage'” error?

孤人 提交于 2020-03-05 02:51:07
问题 I have this error: 'someFunction' is not an exported object from 'namespace:somePackage' Does anyone know how to solve it? 回答1: Some reasons: Function is not part of the package, anymore, try ??someFunction to find out which package it belongs to. Package data is not part of the package Function is available in newer version of the package, reinstall latest version. See also these questions referring to specific instances of this problem: Error: 'use_package' is not an exported object from

Numbering rows within groups in a data frame

ぐ巨炮叔叔 提交于 2020-01-25 09:37:08
问题 Working with a data frame similar to this: set.seed(100) df <- data.frame(cat = c(rep("aaa", 5), rep("bbb", 5), rep("ccc", 5)), val = runif(15)) df <- df[order(df$cat, df$val), ] df cat val 1 aaa 0.05638315 2 aaa 0.25767250 3 aaa 0.30776611 4 aaa 0.46854928 5 aaa 0.55232243 6 bbb 0.17026205 7 bbb 0.37032054 8 bbb 0.48377074 9 bbb 0.54655860 10 bbb 0.81240262 11 ccc 0.28035384 12 ccc 0.39848790 13 ccc 0.62499648 14 ccc 0.76255108 15 ccc 0.88216552 I am trying to add a column with numbering

Split comma-separated strings in a column into separate rows

给你一囗甜甜゛ 提交于 2020-01-25 08:02:07
问题 I have a data frame, like so: data.frame(director = c("Aaron Blaise,Bob Walker", "Akira Kurosawa", "Alan J. Pakula", "Alan Parker", "Alejandro Amenabar", "Alejandro Gonzalez Inarritu", "Alejandro Gonzalez Inarritu,Benicio Del Toro", "Alejandro González Iñárritu", "Alex Proyas", "Alexander Hall", "Alfonso Cuaron", "Alfred Hitchcock", "Anatole Litvak", "Andrew Adamson,Marilyn Fox", "Andrew Dominik", "Andrew Stanton", "Andrew Stanton,Lee Unkrich", "Angelina Jolie,John Stevenson", "Anne Fontaine"

What is the difference between = and ==?

雨燕双飞 提交于 2020-01-10 03:19:09
问题 What is the difference between = and == ? I have found cases where the double equal sign will allow my script to run while one equal sign produces an error message. When should I use == instead of = ? 回答1: It depends on context as to what = means. == is always for testing equality. = can be in most cases used as a drop-in replacement for <- , the assignment operator. > x = 10 > x [1] 10 used as the separator for key-value pairs used to assign values to arguments in function calls. rnorm(n =