Im getting this error while executing this line in RStudio, I have tuneR lib installed.
birds <- readWave("birds.wav")
Error in readBin(con, int, n = 4, size = 1, endian = "little", signed = FALSE) %*% :
non-conformable arguments
In addition: Warning message:
In readChar(con, 4, useBytes = TRUE) : truncating string with embedded nuls
Tried to look for examples and can´t find any that helps me.
I have the following API call function:
df.load <- loaddf(r = as.character(readline(prompt = "Please enter r parameter: "))
,y= as.character(readline(prompt = "Please enter y parameter: "))
,z= as.character(readline(prompt = "Please enter z parameter: ")) )
,format="json"
# Convert to dataframe
data.df <- as.data.frame(df.load )
However, sometimes it fails to connect:
Warning in file(file, "rt") :
InternetOpenUrl failed: 'A connection with the server could not be established'
Error in file(file, "rt") : cannot open the connection
and a number of observations in the final dataframe data.df is equal to 0, but when I re-run the code 3-4 times, it works.
Therefore I want to push R to re-run this chunk in the .rmd file if the connection failed or a number of observations are equal to 0 in data.df.
Or if you have any other ideas on how to solve this issue I am open to your suggestions.
Thanks
I try to run tis command
dtm <- CreateDtm(tokens$text,
doc_names = tokens$ID,
ngram_window = c(1, 2))
However I receive this error:
Error in seq.default(1, length(tokens), 5000) :
wrong sign in 'by' argument
In addition: Warning message:
In CreateDtm(tokens$text, doc_names = tokens$ID, ngram_window = c(1, :
No document names detected. Assigning 1:length(doc_vec) as names.
Any idea what I have to change in order to run it properly?
I am writing the following below. R studio would send an error message:
Error: unexpected input in "names(mancova)= c(�
in resonse to the line where I give new names to the columns:
names(mancova)= c(“GPID”, “Precomp”, Postcomp”, “Posthior”)
Here is the full code:
install.packages("MASS")
install.packages("car")
install.packages("psych")
install.packages("Rcpp")
library(MASS)
library (car)
library(psych)
group1 = matrix(c(1,15,17,3,1,10,6,3,1,13,13,1,1,14,14,8,1,12, 12, 3, 1, 10, 9, 9,1,12,12,3,1,8,9,12,1,12,15,3,1,8,10,8,1,12,13,1,1,7,11,10,1,12,16,1,1,9,12,2,1,12,14,8), nrow=15,ncol=4, byrow=TRUE)
group2=matrix(c(2,9,9,3,2,13,19,5,2,13,16,11,2,6,7,18,2,10,11,15,2,6,9,9,2,16,20,8,2,9,15,6,2,10,8,9,2,8,10,3,2,13,16,12,2,12,17,20,2,11,18,12,2,14,18,16),nrow=14,ncol=4,byrow=TRUE)
mancova = data.frame(rbind(group1, group2))
names(mancova)= c(“GPID”, “Precomp”, Postcomp”, “Posthior”)
attach(mancova)
mancova
options(scipen=999)
outcome = cbind(mancova$Postcomp, mancova$Posthior)
model = manova(outcome~GPID+Precomp+GPID*Precomp, data=mancova)
summary(model, test=“Wilks”, type=“III”)
factor(GPID)
modelA = aov(Postcomp~Precomp+GPID, data=mancova)
summary(modelA, type=“III”)
library(effects)
adjmeanA = effect(“GPID”, modelA, se=TRUE,xlevels=2)
summary(adjmeanA)
adjmeanA$se
Its written in the error itself:
Error: unexpected input in "names(mancova)= c(�
The last symbol is unknown to R, which is an italic/cursive version of the quotes. " " is defined/valid. " " is not.
When I run the following code:
s1 <- cspade(x, parameter = list(support = 0.1, maxsize = 1, maxlen = 1),
control = list(verbose = TRUE))
I receive the following error:
Total elapsed time 0.00286102
1 partition(s), 0 MB [0.12s]
mining transactions ...MINSUPPORT 1 out of 4 sequences
reading sequences ...cannot open file
'C:\Users\ERKANE~1\AppData\Local\Temp\RtmpohPsWy\cspade3894f1b4b9f.out': No
such file or directoryError in file(con, "r") : cannot open the connection
When I check the directory, I do not see any .out file. I have attempted to change the TMPDIR to another location, but still received the same error. I run r-studio as admin, but still receive the same error. I am able to create a file in the same directory write.csv(mtcars,paste(tempdir(),"mtcars.csv",sep="\\")). Any ideas?
I am using R version 3.5.1 and RStudio-1.1.456.