Errors in R
Errors in R

Errors in R

1974

1.Could not find function "XYZ" when xyz isnt a function.

Check for typos, in particular () instead of [],eg,you put xyz(1,2) instead of xyz[1,2]

2.Could not find function "xyz" when xyz is a function.
 i.Check for types.
 ii. Is it a function you wrote yourself or is included in a script? if so, run that bit of the script agian and make sure it runs without an error.
iii. Have you loaded the package containing the function? Use?? xyz to see which package its in;
  use search()to see if the package is loaded.

3. No such file or directory when you try to read in a file with read, table,. csv or similar functions.
i.Check that you have got the file name right,including the extension (the last few letters after the dot), and its in "quotes".
ii. Do one of the following:
Use the full path to the file, eg,  "C:/users/me/workshop/ant.csv" Note that R uses forward slashes(/) in file names, not backslashes(/).
Change the working directory to the one with the file you are looking for:go to file>
Change dir... or do setwd(choose.dir()) and select the right folder.
put file.choose() in place of the file name, then browse to find the right file.

 4.There is no package called "XYZ" when you do libary (xyz)
i.Check the spelling for types and lower/upper case!
ii.Loook for the package in the list of packages installed: use packages>Load package ... from the main menu or do 
rownames(installed.packages())
iii. If its not there, you need to install it. Most packages are on the CRAN repository; for those use install.packages ("XYZ") # with "quotes"

5.Error in file (con,"r"): cannot open the connection
In addition: Warning message:
In file (con,"r"):
Internetopen Url failed: "The server name or address could not be resolved"
Check the internet connection and run the code again.

6.Error in as data frame default (x[[i]], optional = TRUE):
Cannot coerce class "c("simple_ Sent_Token_Annotator", Annotator")" to a data.frame
For this error just detach caret package & then detach ggplot2
This is because ggplot2 is also there in NLP package

7.Library (xlsx)
Error Message:
Loading required package: rJava
Error: .onload failed in loadNamespace() for rJava, details:
call: fun(libname,pkgname)
error: JAVA_HOMEcannot be determined from the Registry 
Error:package rjava could not be loaded
fixing the Error?
Need to install 64 bit java
go to https://java.com/en/download/manual.jsp
choose Windows Offline 64 bit
Once this version of java installed the packages will be successfully installed and loaded into R.

8.view(Data.pca$rotation)
Error: could not find function "view"
Need to Tyoe capital V in view

9.skewness (AT)
Error: could not find function "skewness"
 Need to install "Moments"
Install.packages ("moments")
Library(moments)

10. kurtosis(AT)
Error: could not find function "kurtosis"
Need to install "Moments"
install.packages ("moments")
Library(moments)

11.summary(Groceries)
Error in summary(Groceries): object Groceries not found 
Need to write in 
Summary ("Groceries")

 

Post Comments

Call Us