Displaying 6 results from an estimated 6 matches for "all_args".
2024 Nov 01
1
Invalid term in model formula with gmm after formula.tools is loaded
...s")
7: model.frame(data = object$data, formula = NA ~ NA, drop.unused.levels = TRUE,
na.action = "na.pass") # <-- formula is already NA ~ NA here
6: eval(mfh, parent.frame())
5: eval(mfh, parent.frame())
4: getDat(object$g, object$x, data = object$data)
3: getModel.baseGmm(all_args, ...)
2: getModel(all_args, ...)
1: gmm(z ~ zm, x = ~zm)
It seems that in base R, as.character(z ~ zm) returns a three-element
character vector, while with formula.tools loaded, it only returns a
single string, 'z ~ zm'. This breaks formula manipulation in getDat().
An immediate workaroun...
2024 Nov 03
1
Invalid term in model formula with gmm after formula.tools is loaded
...= object$data, formula = NA ~ NA, drop.unused.levels =
> TRUE,
> na.action = "na.pass") # <-- formula is already NA ~ NA here
> 6: eval(mfh, parent.frame())
> 5: eval(mfh, parent.frame())
> 4: getDat(object$g, object$x, data = object$data)
> 3: getModel.baseGmm(all_args, ...)
> 2: getModel(all_args, ...)
> 1: gmm(z ~ zm, x = ~zm)
>
> It seems that in base R, as.character(z ~ zm) returns a three-element
> character vector, while with formula.tools loaded, it only returns a
> single string, 'z ~ zm'. This breaks formula manipulation in getD...
2024 Oct 30
1
Invalid term in model formula with gmm after formula.tools is loaded
Hi everyone,
I am using the gmm function from the gmm package and encountered an
unexpected error. No model can be estimated if I load formula.tools?I need
to restart R each time. Here is a simple reproducible example:
*library(gmm)data(Finance)r <- Finance[1:300, 1:10]rm <- Finance[1:300,
"rm"]rf <- Finance[1:300, "rf"]z <- as.matrix(r-rf)zm
2019 Aug 13
0
[PATCH libnbd 1/6] generator: Share single list of all Closures.
...flags", cmd_flags) ];
ret = RInt64;
permitted_states = [ Connected ];
@@ -3207,30 +3194,6 @@ let () =
failwithf "%s: optargs can only be empty list or [OFlags]" name
) handle_calls;
- (* Closures must be uniquely named across all calls. *)
- let () =
- let all_args =
- List.flatten (List.map (fun (_, { args }) -> args) handle_calls) in
- let h = Hashtbl.create 13 in
- List.iter (
- function
- | Closure { cbname; cbargs } ->
- (try
- (* If we've already added this name to the hash, check
- * closure...
2019 Aug 03
1
[PATCH libnbd] generator: Generate typedefs automatically for Closure arguments.
...in
+ let xs = uniq ~cmp xs in
+ xs
+
let chan = ref Pervasives.stdout
let pr fs = ksprintf (fun str -> output_string !chan str) fs
@@ -3100,6 +3119,30 @@ let () =
name
) handle_calls;
+ (* Closures must be uniquely named across all calls. *)
+ let () =
+ let all_args =
+ List.flatten (List.map (fun (_, { args }) -> args) handle_calls) in
+ let h = Hashtbl.create 13 in
+ List.iter (
+ function
+ | Closure { cbname; cbargs } ->
+ (try
+ (* If we've already added this name to the hash, check
+ * closure...
2019 Aug 13
12
[PATCH 0/6] Implement OClosure.
Patches 1-4 are basically uncontroversial, straightforward refactoring
and IMHO we should just push them. Possibly 1-3 should be squashed
together, but I posted them separately so they are easier to review.
Patches 5 and 6 together implement OClosure. Patch 5 adds the feature
and is simple to understand.
Patch 6 changes the Closure completion callbacks into OClosure, but
because it doesn't