# Struggling to migrate from R (dplyr) to Julia (DataFrameMeta)

**URL:** <https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473>\
**Category:** New to Julia\
**Tags:** question, dataframes, dataframesmeta\
**Created:** [February 11, 2023, 3:44pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473 "2023-02-11T15:44:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philip\_Rhome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/philip_rhome/32/46544_2.png) [@Philip\_Rhome](https://discourse.julialang.org/u/Philip_Rhome)\
**Post date:** [February 11, 2023, 3:44pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/1 "2023-02-11T15:44:20Z")

</div>

hello dear julia developers  
i’m new to julia and i’m fascinated by the power and performance of this great language  
i’m trying to convert my notebooks in R to Julia to help me learn it but the issue is that i’m stuck with a small issue  
i have a dataframe that i need to select all columns except few ones

```julia
@select df $(Not([:Label, :Local]))

```

but i always get this error message

```julia
ArgumentError: Expressions not of the form `y = f(:x)` are currently disallowed.

```

despite that i followed exactly what is written in the documentations

---

<div class="post-metadata">

**Author:** ![adienes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adienes/32/37459_2.png) [@adienes](https://discourse.julialang.org/u/adienes)\
**Post date:** [February 11, 2023, 3:51pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/2 "2023-02-11T15:51:55Z")

</div>

What version are you on? I am having trouble recreating the error.

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [February 11, 2023, 4:01pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/3 "2023-02-11T16:01:23Z")

</div>

On DataFramesMeta.jl 0.13 what you write works:

```julia
julia> using DataFramesMeta

julia> df = DataFrame(rand(2, 4), :auto)
2×4 DataFrame
 Row │ x1 x2 x3 x4
     │ Float64 Float64 Float64 Float64
─────┼────────────────────────────────────────
   1 │ 0.693758 0.948115 0.731398 0.616161
   2 │ 0.691157 0.913739 0.557192 0.368638

julia> @select df $(Not([:x2, :x4]))
2×2 DataFrame
 Row │ x1 x3
     │ Float64 Float64
─────┼────────────────────
   1 │ 0.693758 0.731398
   2 │ 0.691157 0.557192

```

(you are probably aware that in this case you can also just write `select(df, Not([:Label, :Local])`?)

---

<div class="post-metadata">

**Author:** ![Philip\_Rhome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/philip_rhome/32/46544_2.png) [@Philip\_Rhome](https://discourse.julialang.org/u/Philip_Rhome)\
**Post date:** [February 11, 2023, 4:08pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/4 "2023-02-11T16:08:10Z")

</div>

thank you for the response dear @bkamins  
i’m at version 0.7.1, i will try to update DataFramesMeta  
btw, i’m very fan of you and i started learning watching your tutorials 😃

---

<div class="post-metadata">

**Author:** ![Philip\_Rhome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/philip_rhome/32/46544_2.png) [@Philip\_Rhome](https://discourse.julialang.org/u/Philip_Rhome)\
**Post date:** [February 11, 2023, 4:11pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/5 "2023-02-11T16:11:47Z")

</div>

thank you for the response dear @adienes  
i’m at version 0.7.1

---

<div class="post-metadata">

**Author:** ![Philip\_Rhome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/philip_rhome/32/46544_2.png) [@Philip\_Rhome](https://discourse.julialang.org/u/Philip_Rhome)\
**Post date:** [February 11, 2023, 4:57pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/6 "2023-02-11T16:57:57Z")

</div>

it seems like the issue is related to the outdated package of DataFramesmeta, i tried to upgrade it but i failed and i received an error related to some precompiled packages or something

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [February 11, 2023, 5:49pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/7 "2023-02-11T17:49:47Z")

</div>

Do:

```julia
]add DataFramesMeta.jl@0.13

```

and show us the output. The error will tell you where the issue is.

---

<div class="post-metadata">

**Author:** ![Philip\_Rhome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/philip_rhome/32/46544_2.png) [@Philip\_Rhome](https://discourse.julialang.org/u/Philip_Rhome)\
**Post date:** [February 11, 2023, 7:51pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/8 "2023-02-11T19:51:05Z")

</div>

i’m so sorry for bothering you all, but this is what i got unfortunately  
i think tensorflow is the cause of the issue

```julia
ERROR: Unsatisfiable requirements detected for package DataFrames [a93c6f00]:
 DataFrames [a93c6f00] log:
 ├─possible versions are: 0.11.7-1.5.0 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.11.7-1.5.0
 ├─restricted by compatibility requirements with DataFramesMeta [1313f7d8] to versions: 1.0.0-1.5.0
 │ └─DataFramesMeta [1313f7d8] log:
 │ ├─possible versions are: 0.4.0-0.13.0 or uninstalled
 │ └─restricted to versions 0.13 by an explicit requirement, leaving only versions 0.13.0
 └─restricted by compatibility requirements with Compat [34da2185] to versions: 0.11.7-0.21.8 or uninstalled — no versions left
   └─Compat [34da2185] log:
     ├─possible versions are: 1.0.0-4.6.0 or uninstalled
     └─restricted by compatibility requirements with TensorFlow [1d978283] to versions: 1.0.0-2.2.1
       └─TensorFlow [1d978283] log:
         ├─possible versions are: 0.10.2-0.11.0 or uninstalled
         └─restricted to versions * by an explicit requirement, leaving only versions 0.10.2-0.11.0

```

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [February 11, 2023, 8:19pm UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/9 "2023-02-11T20:19:37Z")

</div>

From the log we can see that the problem is [GitHub - malmaud/TensorFlow.jl: A Julia wrapper for TensorFlow](https://github.com/malmaud/TensorFlow.jl) package. I recommend you remove it from your global project (you can still use it in a separate project).

The reason is that last release of this package was in 2019 and it is currently significantly outdated. Most of the packages (not only DataFramesMeta.jl) will not work correctly when TensorFlow.jl is installed.

I even see on its website that its developer recommends switching to Flux.jl.

---

<div class="post-metadata">

**Author:** ![Philip\_Rhome](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/philip_rhome/32/46544_2.png) [@Philip\_Rhome](https://discourse.julialang.org/u/Philip_Rhome)\
**Post date:** [February 12, 2023, 5:19am UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/10 "2023-02-12T05:19:47Z")

</div>

thank you so much sir, it looks like TensorFlow and Torch were holding the updates for many packages and after removing them all packages got updated successfully

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [February 13, 2023, 11:16am UTC](https://discourse.julialang.org/t/struggling-to-migrate-from-r-dplyr-to-julia-dataframemeta/94473/11 "2023-02-13T11:16:32Z")

</div>

My advice is not to put anything substantive into the global environment. It should contain only a few packages useful for things like debugging. Such as Revise or Infiltrator or similar. Any substantive package for a project should go in an environment for that project.
