Below is the code I am using:
if (interactive()) {
library(raster)
library(plainview)
viewRGB(plainview::poppendorf, 4, 3, 2) # true-color
viewRGB(plainview::poppendorf, 5, 4, 3) # false-color
}
I got the following error message:
Error in leafem::addHomeButton(map = map, ext = ext, layer.name = layer.name, :
unused argument (layer.name = layer.name)
In addition: Warning message:
'mapview::addHomeButton' is deprecated.
Use 'leafem::addHomeButton' instead.
See help("Deprecated") and help("mapview-deprecated").
Any help is much appreciated!
-Zhou
Related
I want to create a learner in mlr3, using the distRforest package.
my code:
library(mlr3extralearners)
create_learner( pkg = "." ,
classname = 'distRforest',
algorithm = 'regression tree',
type = 'regr',
key = 'distRforest',
package = 'distRforest',
caller = 'rpart',
feature_types = c("logical", "integer", "numeric","factor", "ordered"),
predict_types = c('response'),
properties = c("importance", "missings", "multiclass",
"selected_features", "twoclass", "weights"),
references = FALSE,
gh_name = 'CL'
)
gives the following error : Error in sprintf(msg, ...) : too few arguments
in fact, replicating the code in the tutorial https://mlr3book.mlr-org.com/extending-learners.html throws the same error.
Any ideas? Thanks a lot - c
thanks for your interest in extending the mlr3 universe!
Couple of things, firstly the example in the book works fine for me, and secondly your example cannot work because you are including classif properties for a regr learner. As I am unable to reproduce your error it's hard for me to debug what's going wrong, it would be helpful if you could run the following:
reprex::reprex({
create_learner(
pkg = ".",
classname = "Rpart",
algorithm = "decision tree",
type = "classif",
key = "rpartddf",
package = "rpart",
caller = "rpart",
feature_types = c("logical", "integer", "numeric", "factor", "ordered"),
predict_types = c("response", "prob"),
properties = c("importance", "missings", "multiclass", "selected_features", "twoclass", "weights"),
references = TRUE,
gh_name = "CL"
)
}, si = TRUE)
If you're still getting an error and the output is too long to print here then head over to the GitHub and open an issue there.
Recently upgraded OpenCV from 3.4.5. to OpenCV 4.2.0.
Before I followed this stitching example: https://github.com/opencv/opencv/blob/5131619a1a4d1d3a860b5da431742cc6be945332/samples/cpp/stitching_detailed.cpp (particularly line 480). After upgrading, I altered the code to align more with this newer example: https://github.com/opencv/opencv/blob/master/samples/cpp/stitching_detailed.cpp (Note line 481).
Problem is with this new computeImageFeatures function, I am getting less detected features. Older code with same images gave me 1400+ features but computeImageFeatures gave me exactly 500 features per image. Any ideas how to "fix" this? I believe it also causes the "Bundle Adjuster" to fail later.
According to documentation of cv::ORB::create, default value of nfeatures argument is 500:
The first argument is nfeatures, you may set the first argument to grater number like 2000.
Here are the constructor arguments:
static Ptr<ORB> cv::ORB::create (int nfeatures = 500,
float scaleFactor = 1.2f,
int nlevels = 8,
int edgeThreshold = 31,
int firstLevel = 0,
int WTA_K = 2,
int scoreType = ORB::HARRIS_SCORE,
int patchSize = 31,
int fastThreshold = 20
)
Try modifying:
if (features_type == "orb")
{
finder = ORB::create();
}
to
if (features_type == "orb")
{
finder = ORB::create(2000);
}
In case you are not using ORB, but other type of features, read the documentation of the constructor.
I assume all types has a limiter argument.
Unable to start AK4 AKPeriodic function in XCode 9. In the following excerpt from the "Plucked String" playground, I inserted two log messages to help identify processing events. I never see the "periodic function startup" message in the console log. All I hear is a very short clicking sound.
let scale = [0, 2, 4, 5, 7, 9, 11, 12]
let performance = AKPeriodicFunction(frequency: playRate) {
print("periodic function startup")
var note = scale.randomElement()
let octave = [2, 3, 4, 5].randomElement() * 12
if random(0, 10) < 1.0 { note += 1 }
if !scale.contains(note % 12) { print("ACCIDENT!") }
let frequency = (note + octave).midiNoteToFrequency()
if random(0, 6) > 1.0 {
pluckedString.trigger(frequency: frequency)
}
}
AudioKit.output = reverb
AudioKit.start(withPeriodicFunctions: performance)
print("AK startup")
performance.start()
This is fixed in the develop branch, as per this issue:
https://github.com/AudioKit/AudioKit/issues/1066
Using the less-rails gem.
Using the following code to mix two colours:
#base: #ffdc52;
#add: #195742;
.colour{
color: mix(#base, #add);
}
getting the following error:
Less::ParseError: error evaluating function `mix`: Cannot read property 'value' of undefined
mix needs three parameters:
mix: function (color1, color2, weight) {
var p = weight.value / 100.0;
...
},
I wish to have the following:
TEnumType = (
etValue1 = 1,
etValue2 = 2 deprecated,
etValue3 = 3);
It returns:
[DCC Error] unt_CollectionImportType.pas(19): E2029 ',' or ')' expected
but identifier 'deprecated' found.
Is there a way to instruct the compiler that this value is deprecated.
type
TEnumType = (
etValue1 = 1,
etDeprecated2 = 2, // was: etValue2; Renamed so we can deprecate it by name
etValue3 = 3);
const
etValue2 = etDeprecated2 deprecated; // Declares a constant mapped to the renamed enum value.