Struggling with R step 5-init.R: base-unit-weight

  • Asked
  • Active
  • Viewed 5717 times
0

Dear all, I changed step 005 base-unit-weight: <- NA to <- 1 but remain to get error, who knows solution? Thanks Joseph

Error in 'R Scripts - Processing chain' 2017-05-22 07:03:20 step : 1-init.R INFO: Processing chain started Loading required package: methods Loading required package: DBI Loading required package: gsubfn Loading required package: proto Loading required package: RSQLite Loading required package: RSQLite.extfuns 2017-05-22 07:03:32 step : - ERROR: Error in postgresqlExecStatement(conn, statement, ...): RS-DBI driver: (could not Retrieve the result : ERROR: column "weight" is of type numeric but expression is of type boolean LINE 7: set "weight" = "r"."weight" from "r" where "mabiotis"."bioto... ^ HINT: You will need to rewrite or cast the expression.

In addition, when running the script in R no errors are recorded ecept: Error in calc.getQuotedFileContent(filename) : could not find function "dbQuoteString"

0

Accepted answer

Thanks Jos for reporting the solution !

Just let us know if other issues come up.

Thank you,

Mino

1

Accepted answer

Hi Jos,

make sure the weight is of type numeric.

Also, make sure the libraries 'RPostgreSQL' and 'sqldf' are installed.

Please let me know if that helps.

Thanks,

Mino

0

Accepted answer

I tried your suggestions but the error messages continued to appear. Finally I reinstalled R2.3.5, before running a script I was then asked to open a CRAN mirror, i used 0 cloud, upon library packages start loading/installing... maybe this i skipped before or did not wait long enough to let the installing finish! After this the script ran without error messages. Fixed, so fellow users see that R is installed completely with required libraries. Thanks Mino

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Menu

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.