Meteor - Constraints on package with unknown "top level" - meteor

I meet many errors like this after merging an update from my fork source:
No version of standard-minifier-js satisfies all constraints: #2.6.0, #~2.5.2
Constraints on package "standard-minifier-js":
* standard-minifier-js#2.6.0 <- top level
* standard-minifier-js#~2.5.2 <- top level
When I open .meteor/packages, I see only standard-minifier-js#2.6.0, and I don't know where the ~2.5.2 comes from. What does the message top level mean other than what's written in .meteor/packages?

The second top level means meteor itself since I have downgraded meteor to 1.8.3.
meteor update --release 1.8.3 --all-packages fixed the problem.

Related

Why am getting the following error when adjusting a glmm with the "glmmTMB" function and I try to obtain the confidence intervals?

I am trying to run the following model:
Mm3znb<-glmmTMB(total~ Geopolitical-1 + offset(logha) + YearCollected + tmn + (tmn|Site/Plot), ziformula = ~1, data = mc3m, family="nbinom2")
but when I try to obtain the confidence intervals am getting this error:
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
Does anyone know what this issue might be?
This is a problem that has been fixed very recently (June 2022) in the development version (confint wasn't working in models with more than one random effect; (tmn|Site/Plot) is implicitly two random effects, as it gets expanded to (tmn|Site) + (tmn|Site:Plot) internally).
If you can (you will need to install development tools - e.g. Xcode if you're on MacOS, Rtools if you're on Windows), install the development version via
remotes::install_github("glmmTMB/glmmTMB/glmmTMB")
The pkgdown page has a little more information about installing (if all else fails, contact the developers to see if they can make a recent binary package available).

How do I deal with an error message while installing a package?

I am brand new to this so please forgive my inexperience...I'm trying to learn.
I'm attempting to install an R package called "Doublet Finder" using the specified code given on the Github site.
When I do this, I get this error immediately:
Error in rbind(info, getNamespaceInfo(env, "S3methods")) :
number of columns of matrices must match (see arg 2)
Being new to R, I'm not sure what this error means and when I google this something similar comes up and the individual removed and re-installed ALL of their libraries...that seems crazy. Does anyone have advice on what this could be, how to fix it, or why the package won't install?
Your problem seems to be fairly similar to this one. It might be the case that the dependencies (packages that Doublet Finder relies on) are outdated. What you can try is to follow these steps to uninstall and reinstall all packages with the hope that by updating packages there isn't a version mismatch.
This code is copied from the website above:
ip <- as.data.frame(installed.packages(lib.loc = .libPaths()[1]),
stringsAsFactors = FALSE)
head(ip)
str(ip)
path.lib <- unique(ip$LibPath)
# create a vector with all the names of the packages you want to remove
pkgs.to.remove <- ip[,1]
head(pkgs.to.remove)
str(pkgs.to.remove)
sapply(pkgs.to.remove, remove.packages, lib = path.lib)
sapply(pkgs.to.remove, install.packages, lib = path.lib)

Creating a parameter in neo4j through R driver

I am trying to generate a graph using the neo4r R driver. I have no problems preforming standard queries such as
"MATCH (n:Node {nodeName: ‘A Name’}) RETURN COUNT(n)” %>% call_neo4j(con)
However when I try to create a parameter with the following query
":params {Testnode: {testNodeName: 'Node Name'}}" %>% call_neo4j(con)
I get the following syntax error
$error_code
[1] "Neo.ClientError.Statement.SyntaxError"
$error_message
[1] "Invalid input ':': expected <init> (line 1, column 1 (offset: 0))\n\":params {Testnode: {testNodeName: 'Node Name'}}\"\n ^"
The parameter query works fine when I run it directly in the neo4j browser so I do not understand how there is a syntax error?
Any ideas on how to fix this greatly accepted!
:params only works in the Neo4j Browser, it's not really Cypher.
Worse, the R Neo4j driver doesn't seem to support passing parameters - there's an open Github issue that points to a fork that contains relevant changes, but that fork also has other changes that make it deviate from the main driver.
I'd try either using the fork to see if it gets you anywhere, and if it does either create the relevant PR to the project or maintain a local fork that track the main driver but just contains that parameter change.

Schedule R Script Every 15 min (cronR)

I need to schedule/run an R script every 15 min. Running on an AWS RStudio instance.
I have played a bit with 'cronR', including loading the add-in. I can figure out how to get it to run "minutely", "hourly", etc...but not every 15-min.
What's the best way to get this done...either in RStudio via cronR or alternative, or via some other method?
So I followed #r2evans advice and opened an issue on git. It was addressed almost immediately with a fix to the code and an update to the readme. Figured I would answer this for completeness in case someone else ever finds their way here...
You can now schedule a job every 15 min with 'cronR' either in the RStudio add-in, or with the following code:
cron_add(script, frequency = '*/15 * * * *', id = 'Job ID', description = 'Every 15 min')
One note is that you might need to reinstall the package using devtools to push through the most recent changes:
devtools::install_github("bnosac/cronR")

R - Matchit - Propensity Score Matching - Discard function not working

I am using the MatchIt package on the LaLonde data-set and the discard argument is generating two types of errors. (The code works if I do not use the discard argument). In both cases, it is not clear how to resolve the problems....
The first issue is when I try discard = "hull.control"
m.opt1 <- matchit(treat ~ inc.re74 + inc.re75 + education + nonwhite +
age + nodegree, data = cps_controls, method = "optimal", ratio=1,
discard="hull.control")
This error message is produced....
Loading required namespace: WhatIf
Preprocessing data ...
Performing convex hull test ...
Error in mclapply(1:m, in_ch, mc.cores = mc.cores) :
'mc.cores' > 1 is not supported on Windows
The second issue is when I try discard = "control"
Error in d[i, ] <- abs(d1[i] - d0) :
number of items to replace is not a multiple of replacement length
Is there a way to address either of these? Thanks!!
Your issue seems to be kinda bug in MatchIt package as noted on SO here and here. I've submitted a ticket on GitHub.
Regarding the discard = "hull.control" issue:
Download the source code of MatchIt from here and edit discard.R. Add to the calls of WhatIf::whatif the argument mc.cores = 1. This should hard-code the number of cores used to 1 and thus eliminate the issue.
Uninstall the MatchIt package and build the new one by opening command line and type R CMD build C:\path\to\MatchIt-master. This should create a .tar.gz file. In R Studio, click on Tools -> Install packages... and select the local package.
You may need to restart R Studio if the library was loaded previously.
Enjoy.

Resources