NixOS / NixOS/nixpkgs

rPackages.mlogit: missing `effects()` function

Open
#511,159 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0.kind: bug
Dominant language
Nix
Stars
26.2k
Forks
20.1k
Avg merge
9h 57m
Merged PRs (30d)
517

Description

Nixpkgs version
  • Unstable (26.05)
Describe the bug

I am using the mlogit library in R. Everything seems fine, except the effects() function described in the documentation simply doesn't exist?! If I type mlogit:: and tab, all other functions appear, but not the effects function. (mlogit.effects doesn't appear either.) Invoking the effects function after loading the library fails, as it uses the one from stats. It is missing in both the stable and unstable versions.

Steps to reproduce

Using this flake:

{
  description = "A basic flake with a shell";
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/25.11";
  inputs.systems.url = "github:nix-systems/default";
  inputs.flake-utils = {
    url = "github:numtide/flake-utils";
    inputs.systems.follows = "systems";
  };

  outputs =
    { nixpkgs, flake-utils, ... }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
      in
      {
        devShells.default = pkgs.mkShell {
          nativeBuildInputs = [ pkgs.bashInteractive ];
          buildInputs = with pkgs; [
            R
            (with rPackages; [
              mlogit
            ])
          ];
        };
      }
    );
}

Enter an R session, type mlogit:: and tab twice to see the list of available functions with the effects function missing.

Expected behaviour

The function exists.

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

❯ nix-shell -p nix-info --run "nix-info -m"

  • system: "x86_64-linux"
  • host os: Linux 6.18.21, NixOS, 26.05 (Yarara), 26.05.20260409.4c1018d
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.31.4
  • channels(root): "nixos-23.11"
  • nixpkgs: /nix/store/anvdcc2arw7kqrvwnidvhw6ypkkvws68-source
Notify maintainers

Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs
Is this issue important to you?

Add a 👍 reaction to issues you find important.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the nixpkgs package expression for rPackages.mlogit and compare the installed package version and exported namespace with the CRAN documentation. Reproduce the flake, then verify that mlogit::effects is available and that the package checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.