Error in seas(AirPassengers) : no output has been generated - r

I am getting this error when I run:
library(seasonal)
m <- seas(AirPassengers)
I have installed the package.
I have uninstalled R, Rstudio, reinstalled and tried again, same error.
Could someone help?
Thanks

I can't reproduce exactly the same error now but I remember following error after I installed the seasonal package:
Error in seas(AirPassengers) : could not find function "seas"
After cleaning up my workspace the error was gone.
Following code is working for me and resulting in the plot below:
library(seasonal)
head(AirPassengers)
m <- seas(AirPassengers, regression.aictest = c("td", "easter"))
plot(m)

Related

Error message when using ggcorrplot() and cor_pmat()

I have trouble with the following code:
library(ggplot2)
library(ggcorrplot)
data(USArrests)
correlation_matrix <- round(cor(USArrests),1)
corrp.mat <- cor_pmat(USArrests)
ggcorrplot(correlation_matrix, hc.order =TRUE, type ="lower",
p.mat = corrp.mat)
When I run the code, execution stops at ggcorrplot(...) and I get this error:
"Error in Math.data.frame(x = list(Assault = c(0.0695, 1.36e-07,
2.6e-12, : non-numeric-alike variable(s) in data frame: rowname"
I tried to run the code in an online R runner and it worked, but in RStudio it doesn´t.
I have no clue whats going on, has somebody an idea?
Thank you #Quinten for your suggestion. Unloading the unnecessary packages helped. The package rstatix seemed to interfere with the cor_pmat() command.

Error: 'set_envvar' is not an exported object from 'namespace:xfun'

I'm trying to run Data Exploration in my R Studio, version 1.3.959 on my windows10.I wrote following test code
if (!require(devtools)) install.packages("devtools")
devtools::install_github("boxuancui/DataExplorer", ref = "develop")
library(DataExplorer)
diabetes_data <- read.csv("https://raw.githubusercontent.com/jbrownlee/Datasets/master/pima-indians-diabetes.csv", header = FALSE)
names(diabetes_data) <- c("number_of_times_pregnant", "plasma_glucose_conc", "diastolic_bp", "triceps_skinfold_thickness", "two_hr_serum_insulin", "bmi", "diabetes_pedigree_function", "age", "label")
# create report
create_report(diabetes_data)
But I'm getting error message
Error: 'set_envvar' is not an exported object from 'namespace:xfun'
Can you please help me to resolve the issue?
I just had this problem and updating my packages solved the issue, especially the package xfun from which set_envvar is originated.

Fail to extract Zip Demographics Data using get_zip_demographics() function in ChoroplethrZip package

I am trying to get the zip demographics data of the year 2015. When I tried the codes below, an error message returns.
library(devtools)
install_github('arilamstein/choroplethrZip#v1.4.0')
library(choroplethrZip)
df_zip_2015 = get_zip_demographics(2015,5)
When the data tries to read in, I first got a few NAs introduced by coercion warnings, but then an error message returns
Error in choroplethr:::convert_acs_obj_to_df("zip", age, 1) :
argument "include_moe" is missing, with no default
Is there a way I can fix this?
It looks like you are installing choroplethrZip version 1.4.0. However, if you go to the choroplethrZip github page you will see that the latest version is actually 1.5.0.
When I run this code:
library(devtools)
install_github('arilamstein/choroplethrZip#v1.5.0')
library(choroplethrZip)
df_zip_2015 = get_zip_demographics(2015,5)
I do not get the error you describe.

Error in plot.new() : internal read error in PDF_endpage

I'm trying to plot a correlation matrix of my data.
Here's my code:
data <- read.table("path/to/data", header=T, sep='\t')
cor <- cor(data)
corrplot(cor, method="color", type="upper")
And i'm getting this error:
Error in plot.new() : internal read error in PDF_endpage
I've never seen this error before and there isn't much on google. Any help?
I had this error just after cleaning up some temp files and solved it by updating my packages:
update.packages()
To me it happened after I removed some temp R files. Not sure why does pdf() files live in temp folders, though.
I had this issue and was finally able to resolve it by using graphics.off(). I had to run the command twice but then plotting worked again.

Getting started with RGoogleAnalytics

I've run the following code (according to http://online-behavior.com/analytics/r ) but get the error
Error in QueryBuilder() :
argument "query.params.list" is missing, with no default
All packages installed successfully, and a googling the error did not produce helpful advice. Any pointers? Thanks.
# run <sudo apt-get install libcurl4-openssl-dev> beforehand
rm(list=ls())
setwd('~')
install.packages(c("RCurl", "httr" , "rjson" , "RGoogleAnalytics", "ggplot2","plyr",
"gridExtra", "reshape" , "RColorBrewer"))
require("RCurl")
require("rjson")
require("ggplot2")
require("plyr")
require("gridExtra")
require("reshape")
require("RGoogleAnalytics")
query <- QueryBuilder()
access_token <- query$authorize()

Resources