I can't find anything pertaining to this particular error message - r

So I keep getting an error message in R when I try to use the bias function here's what my code looks like so far:
install.packages("SimDesign")
library(SimDesign)
actual_temp<-c(68.3,70,72.4,71,67,70)
predicted_temp<-c(67.9,69,71,5,70,67,69)
bias(actual_temp, predicted_temp)
And here's the error message I get when I run the code:
Error in bias(actual_temp, predicted_temp) :
ncol(estimate) == length(parameter) is not TRUE
I've tried figuring out if my syntax is off (I'm a novice so I'm never 100% sure). I then tried copy-pasting the error into the search bar and came up with nothing. If anyone has an idea of how to fix this that would be great in case it's a problem I run into again in the future.
Edit: I tried again with some different data and it worked just fine. Is there something in this specific instance you can identify that's making it not work?

Related

What does this error message mean (creating an input-file for MODifieR) and how to fix it?

I am trying to create an input-file that can be used for different types of module-identification packages in the "MODifieR"-program, but I get this error message: "The condition has a length>1".
I am still pretty new to R and have just started using these programs so I have no idea what the message means or how to fix it... Greatful for any help!
I haven't tried anything yet, apart from restarting R and reloading all packages/code, as I have little idea of what I am doing :)

Getting an error when intry to load a dataframe

Getting a syntax error and not sure why. Trying to loadca dataframe. Please can someone help. Thanks
If you are getting started with programming, jupyter can be counter intuitive at some points, I assume that's not your first cell in the notebook, so be sure to run the previous ones where the definition for titanic_df/titanic_csv is loaded.
The error you are getting says NameError, not SyntaxError, and it is informing you that a variable called titanic_csv does not exist.

OpenAI Gym - Env.Render() function returning "Display surface quit"

A screenshot of my code with error
I am following the tutorial seen at https://www.youtube.com/watch?v=7SVv07QXO5M&ab_channel=HackersRealm
The exact code I am following is here: https://github.com/aswintechguy/Reinforcement-Learning-Projects/blob/main/Cartpole%20Balance%20-%20OpenAI%20Gym%20-%20Reinforcement%20Learning/CartPole%20Balance%20-%20OpenAI%20Gym%20-%20Reinforcement%20Learning.ipynb
Not sure what I am doing wrong but the guy doing the tutorial had no issues so I'm not sure how to troubleshoot this. I'm also doing this in a Jupyter Notebook. Any ideas what I might be doing wrong here?
I have seen similar error, in my case i got this error when i ran the env.close() and tried running again, i'm suspecting, this was the reason for my error, because once env.close() has been called there is no environment to perform rest of the operations so I had to re-run the cell to create the environment to try it again. Im assuming this may have been your case.
Try running the cell with make environment and retry the cell which throws u the error.

Why can't read_csv use my directory/path?

I am having a problem with my read_csv. I have used this function with no problem but the path/directory I am using is a little different than normal and I can't figure it out by myself.
This is the code I have been using:
X2022_03_08_habit_and_OCD_clinical <- read_csv("Box/OCD: Habit or Learning?/experiment/data/raw/survey-data/2022-03-08_habit-and-OCD_clinical.csv")
I have tired tweaking this by not using the first two arguments with no luck. Has anyone used Box in a path before (Box is in my finder, like desktop would be). I also tried updating r for that first error code but maybe it didn't take, I am not sure how to update again.
Here is the error code I have been receiving:Error Message
I would appreciate any help and I apologize if there is a simple answer I have been missing!

Difficulty calling R2OpenBUGS

I am having a problem calling R2OpenBUGS.
I suspect it is probably simple to fix but I can't spot the solution.
My call looks like this:
MCMCres<-bugs(data=d,inits=inits,parameters.to.save=c("theta","alpha","tau","precv"),
n.iter=2000,model.file="model.txt",n.chains=2,n.burnin=250,n.thin=5,
OpenBUGS.pgm=BugsDir,codaPkg=F,working.directory=wdir,debug=T,WINE=NULL)
The error I get back is as follows:
Error in bugs.run(n.burnin, OpenBUGS.pgm, debug = debug, WINE = WINE, :
Look at the log file in C:/Users/James/Desktop/ALS Spatial Analysis/ALS and
try again with 'debug=TRUE' to figure out what went wrong within OpenBUGS.
Now OpenBUGS isn't even opening so the log file is not written. I'm not sure whats going on since this is all I have to go on. It is finding the OpenBUGS executable and it is finding the model file as those were errors I had gotten previously and have fixed.
Any ideas anyone ?

Resources