# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=605

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 606

---

## [Sort dataframe by column values](https://discourse.julialang.org/t/sort-dataframe-by-column-values/60318)

<div class="topic-metadata">

**Author:** [@Shazman](https://discourse.julialang.org/u/Shazman)\
**Replies:** 1\
**Last updated:** [April 30, 2021, 2:20pm UTC](https://discourse.julialang.org/t/sort-dataframe-by-column-values/60318 "2021-04-30T14:20:17Z")

</div>

HI I want to sort the data A by column value in column ID. so the new data will have only one ID with numbers for each ID how can I do that? thank you in advance. data A 27856×2 DataFrame Row │ ID numbers │…

---

## [Alternative to \`deps/build.jl\` to download and process data](https://discourse.julialang.org/t/alternative-to-deps-build-jl-to-download-and-process-data/60309)

<div class="topic-metadata">

**Author:** [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Replies:** 1\
**Last updated:** [April 30, 2021, 1:46pm UTC](https://discourse.julialang.org/t/alternative-to-deps-build-jl-to-download-and-process-data/60309 "2021-04-30T13:46:31Z")

</div>

So far, binary dependencies of ArcadeLearningEnvironment are downloaded and processed during the build step. Processing consists basically of unrar, unzip, renaming files based on md5 sums and deleting obsolete files. Th…

---

## [Any Julia only IDE available?](https://discourse.julialang.org/t/any-julia-only-ide-available/7081)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 22\
**Last updated:** [April 30, 2021, 11:58am UTC](https://discourse.julialang.org/t/any-julia-only-ide-available/7081 "2021-04-30T11:58:12Z")

</div>

I would like to know if there is any IDE that is designed specifically for Julia, I am more comfortable with IDE like RStudio, PyCharm, etc. I think Julia should have its own IDE. I understand that some users write C++ …

---

## [Iterate over Fields of named tupel](https://discourse.julialang.org/t/iterate-over-fields-of-named-tupel/60294)

<div class="topic-metadata">

**Author:** [@nonameclimber](https://discourse.julialang.org/u/nonameclimber)\
**Replies:** 2\
**Last updated:** [April 30, 2021, 9:51am UTC](https://discourse.julialang.org/t/iterate-over-fields-of-named-tupel/60294 "2021-04-30T09:51:05Z")

</div>

Hi, I have a named tupel with 3 fields with Int64-Array and 1 field with a struct called “agent”. ::NamedTuple{(:S, :I, :R, :agents),Tuple{Array{Any,1},Array{Any,1},Array{Any,1},Array{Main.workspace3.Agent,1}}} Is the…

---

## [Simple Rule Engine](https://discourse.julialang.org/t/simple-rule-engine/59125)

<div class="topic-metadata">

**Author:** [@Dustin\_Hess](https://discourse.julialang.org/u/Dustin_Hess)\
**Replies:** 9\
**Last updated:** [April 30, 2021, 5:35am UTC](https://discourse.julialang.org/t/simple-rule-engine/59125 "2021-04-30T05:35:43Z")

</div>

Hi All I am teaching myself some design patterns currently I am trying to build a simple Rule Engine. I ran upon an issue where I would like to call many functions ( rule set) while passing them the same parameters. In …

---

## [Spawning inside a module](https://discourse.julialang.org/t/spawning-inside-a-module/18715)

<div class="topic-metadata">

**Author:** [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Replies:** 2\
**Last updated:** [April 30, 2021, 4:47am UTC](https://discourse.julialang.org/t/spawning-inside-a-module/18715 "2021-04-30T04:47:31Z")

</div>

Hello everyone. I am trying to create a struct which stores a function with the intention to be executed in parallel over multiple cores. The problem seems I am facing is that struct fields seem to only reference functi…

---

## [Integrand produced a NaN. Domain error using QuadGK](https://discourse.julialang.org/t/integrand-produced-a-nan-domain-error-using-quadgk/60287)

<div class="topic-metadata">

**Author:** [@leopdsf](https://discourse.julialang.org/u/leopdsf)\
**Replies:** 3\
**Last updated:** [April 30, 2021, 3:37am UTC](https://discourse.julialang.org/t/integrand-produced-a-nan-domain-error-using-quadgk/60287 "2021-04-30T03:37:10Z")

</div>

Hello, everyone. I’m trying to solve numerically the following integral: \\int \_{-\\infty} ^{\\infty} \\exp(-z^2/2)\\ln(2\\cosh(z)) dz = 2.67636. For that, I write the following using QuadGK f3(z) = exp(-z^2/2)\*log(2\*cosh…

---

## [Initialise array without specific types](https://discourse.julialang.org/t/initialise-array-without-specific-types/60204)

<div class="topic-metadata">

**Author:** [@baptnz](https://discourse.julialang.org/u/baptnz)\
**Replies:** 25\
**Last updated:** [April 30, 2021, 12:51am UTC](https://discourse.julialang.org/t/initialise-array-without-specific-types/60204 "2021-04-30T00:51:36Z")

</div>

I wrote a program that works fine but has several hard-coded types (Float64, etc.) which I’m now trying to get rid of, because they get in the way of automatic differentiation. I’ve hit a snag with the following: I init…

---

## [Symbolics.jl: simplification of expressions with trigonometric terms](https://discourse.julialang.org/t/symbolics-jl-simplification-of-expressions-with-trigonometric-terms/59904)

<div class="topic-metadata">

**Author:** [@cnf](https://discourse.julialang.org/u/cnf)\
**Replies:** 9\
**Last updated:** [April 29, 2021, 8:19pm UTC](https://discourse.julialang.org/t/symbolics-jl-simplification-of-expressions-with-trigonometric-terms/59904 "2021-04-29T20:19:00Z")

</div>

I am using the Symbolics.jl package with julia 1.5.2 running on a linux machine. Any assistance with the following would be appreciated. (1) How can I simplify expressions with trigonometric terms? For example, I appl…

---

## [Plotting broken? Gadfly and Plots backends not showing axis ticks, can't plot DataFrames](https://discourse.julialang.org/t/plotting-broken-gadfly-and-plots-backends-not-showing-axis-ticks-cant-plot-dataframes/60201)

<div class="topic-metadata">

**Author:** [@datadreamscorp](https://discourse.julialang.org/u/datadreamscorp)\
**Replies:** 14\
**Last updated:** [April 29, 2021, 7:42pm UTC](https://discourse.julialang.org/t/plotting-broken-gadfly-and-plots-backends-not-showing-axis-ticks-cant-plot-dataframes/60201 "2021-04-29T19:42:02Z")

</div>

Opened one of my scripts today to find this error whenever I tried to plot using a DataFrame in Pluto.jl. Tried plotting two vectors in another session and axis ticks are not showing properly (image below), which I guess…

---

## [How to capture results from Pkg.test](https://discourse.julialang.org/t/how-to-capture-results-from-pkg-test/60214)

<div class="topic-metadata">

**Author:** [@bluesmoon](https://discourse.julialang.org/u/bluesmoon)\
**Replies:** 1\
**Last updated:** [April 29, 2021, 4:41pm UTC](https://discourse.julialang.org/t/how-to-capture-results-from-pkg-test/60214 "2021-04-29T16:41:10Z")

</div>

When I test a package using Pkg.test("PackageName"), how do I capture the results in the calling process? ie, something like results = Pkg.test("PackageName") Is my only option to use a custom test set subtype? If this…

---

## [Libdl.dlopen or Libdl.find\_library does not find a shared library](https://discourse.julialang.org/t/libdl-dlopen-or-libdl-find-library-does-not-find-a-shared-library/55161)

<div class="topic-metadata">

**Author:** [@Siel](https://discourse.julialang.org/u/Siel)\
**Replies:** 10\
**Last updated:** [April 29, 2021, 3:44pm UTC](https://discourse.julialang.org/t/libdl-dlopen-or-libdl-find-library-does-not-find-a-shared-library/55161 "2021-04-29T15:44:57Z")

</div>

I’m trying to call a custom C library whitin Julia but everything I tried have been fruiteless. I always get exactly the same error: /home/siel/Dev/npodjl/ipm\_v2.so: cannot open shared object file: No such file or direct…

---

## [XML to DataFrame](https://discourse.julialang.org/t/xml-to-dataframe/28429)

<div class="topic-metadata">

**Author:** [@jonjilla](https://discourse.julialang.org/u/jonjilla)\
**Replies:** 7\
**Last updated:** [April 29, 2021, 3:01pm UTC](https://discourse.julialang.org/t/xml-to-dataframe/28429 "2021-04-29T15:01:07Z")

</div>

I have an xml file that has the following list of lines under a node. It looks like this (several thousand rows like the following) \<Obj Time="2019-09-01T23:40:13+08:00" attr1="L" attr2="1" attr3="a"/\> \<Obj Time="2019-…

---

## [gamma(::BigFloat) overflows on Windows](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169)

<div class="topic-metadata">

**Author:** [@DNF](https://discourse.julialang.org/u/DNF)\
**Replies:** 7\
**Last updated:** [April 29, 2021, 2:36pm UTC](https://discourse.julialang.org/t/gamma-bigfloat-overflows-on-windows/60169 "2021-04-29T14:36:24Z")

</div>

jl\> p = big(3.6e13) 3.6e+13 jl\> q = 1/big(0.563483398)+1 2.774675178628776489804929213602311938188089959295862682297487944939957397047059 jl\> beta(p, q) NaN ?? :confused:

---

## [HTTP.jl IOError: stream is closed or unusable](https://discourse.julialang.org/t/http-jl-ioerror-stream-is-closed-or-unusable/31320)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 14\
**Last updated:** [April 29, 2021, 1:56pm UTC](https://discourse.julialang.org/t/http-jl-ioerror-stream-is-closed-or-unusable/31320 "2021-04-29T13:56:28Z")

</div>

Hi all- I am trying to communicate with a Julia websocket server via Java and I encounter an error stating: IOError: stream is closed or unusable The server receives the message but Java never receives the response, p…

---

## [Accessing a array type from a struct without declaring a new array](https://discourse.julialang.org/t/accessing-a-array-type-from-a-struct-without-declaring-a-new-array/60234)

<div class="topic-metadata">

**Author:** [@Josa9321](https://discourse.julialang.org/u/Josa9321)\
**Replies:** 4\
**Last updated:** [April 29, 2021, 1:28pm UTC](https://discourse.julialang.org/t/accessing-a-array-type-from-a-struct-without-declaring-a-new-array/60234 "2021-04-29T13:28:48Z")

</div>

I have a function that needs to access a matrix from a struct, but every time the function does this inside this loop, it’s like it creates a new matrix m = foo.bar, or at least the time to run and the allocation necess…

---

## [Using NLopt through GalacticOptim](https://discourse.julialang.org/t/using-nlopt-through-galacticoptim/60244)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 0\
**Last updated:** [April 29, 2021, 1:27pm UTC](https://discourse.julialang.org/t/using-nlopt-through-galacticoptim/60244 "2021-04-29T13:27:11Z")

</div>

I’m trying to use NLopt though GalacticOptim, but can’t get it work. What am I doing wrong below? using NLopt using GalacticOptim # rosenbrock function f(x; a=1, b=100) (a - x\[1\])^2 + b\*(x\[2\] - x\[1\]^2)^2 end # GO …

---

## [Dependencies failed but may be precompilable after restarting julia | What are those question marks?](https://discourse.julialang.org/t/dependencies-failed-but-may-be-precompilable-after-restarting-julia-what-are-those-question-marks/60236)

<div class="topic-metadata">

**Author:** [@meck](https://discourse.julialang.org/u/meck)\
**Replies:** 6\
**Last updated:** [April 29, 2021, 1:18pm UTC](https://discourse.julialang.org/t/dependencies-failed-but-may-be-precompilable-after-restarting-julia-what-are-those-question-marks/60236 "2021-04-29T13:18:52Z")

</div>

I am trying to install a required package but it doenst work and I am getting a bunch of question marks. How do I solve this? Thank you. ERROR: LoadError: UndefVarError: AbstractPlotting not defined Stacktrace: \[1\] top…

---

## [Passing String parameters](https://discourse.julialang.org/t/passing-string-parameters/60211)

<div class="topic-metadata">

**Author:** [@jrhut](https://discourse.julialang.org/u/jrhut)\
**Replies:** 8\
**Last updated:** [April 29, 2021, 12:18pm UTC](https://discourse.julialang.org/t/passing-string-parameters/60211 "2021-04-29T12:18:19Z")

</div>

Hi there, I’m trying to pass a String to my function foo (s::A, n::N=2) where {A\<:Union{String,Vector{String}}, N \<: Number} I’m calling the function as so foo(“test”) and am receiving the error MethodError: Cannot co…

---

## [How to remove one of type parameters in a method signature?](https://discourse.julialang.org/t/how-to-remove-one-of-type-parameters-in-a-method-signature/60070)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 2\
**Last updated:** [April 29, 2021, 10:29am UTC](https://discourse.julialang.org/t/how-to-remove-one-of-type-parameters-in-a-method-signature/60070 "2021-04-29T10:29:30Z")

</div>

I have a bunch of method signatures like this: sig1 = Tuple{typeof(rrule), typeof(sum), AbstractArray{T, N} where N} where T\<:Number sig2 = Tuple{typeof(rrule), typeof(mean), AbstractArray{var"#s256", N} where {var"#s25…

---

## [Pkg.add("PyPlot@2.9.0"); is not a valid package name](https://discourse.julialang.org/t/pkg-add-pyplot-2-9-0-is-not-a-valid-package-name/60228)

<div class="topic-metadata">

**Author:** [@jcabrera](https://discourse.julialang.org/u/jcabrera)\
**Replies:** 2\
**Last updated:** [April 29, 2021, 9:08am UTC](https://discourse.julialang.org/t/pkg-add-pyplot-2-9-0-is-not-a-valid-package-name/60228 "2021-04-29T09:08:05Z")

</div>

hi there, I’m using a command line to install packages. I have a problem when I want to fix the version. In the doc: https://pkgdocs.julialang.org/v1/managing-packages/ It is said that I can use @version, #branchname …

---

## [How to verify the convolution theorem in Julia?](https://discourse.julialang.org/t/how-to-verify-the-convolution-theorem-in-julia/60185)

<div class="topic-metadata">

**Author:** [@Minimum-Pollution-96](https://discourse.julialang.org/u/Minimum-Pollution-96)\
**Replies:** 15\
**Last updated:** [April 29, 2021, 8:32am UTC](https://discourse.julialang.org/t/how-to-verify-the-convolution-theorem-in-julia/60185 "2021-04-29T08:32:30Z")

</div>

I’ve trying to prove convolution theorem in Julia but without success. Say I have two function f1 = sin(30πt) & f2 = sin(10πt). Then, I have the following code fconv\_fda = ifft(fft(f1).\*fft(f2)) fconv\_tda = DSP.conv(f1,…

---

## [Warning Error when Using DiffEquationSolver](https://discourse.julialang.org/t/warning-error-when-using-diffequationsolver/60218)

<div class="topic-metadata">

**Author:** [@Peter-Jolly](https://discourse.julialang.org/u/Peter-Jolly)\
**Replies:** 4\
**Last updated:** [April 29, 2021, 8:23am UTC](https://discourse.julialang.org/t/warning-error-when-using-diffequationsolver/60218 "2021-04-29T08:23:31Z")

</div>

I have been successfully solving a system of 123 ODE’s for the past few month using Julia. I have tried a number of solvers (see some commented out code below). The Tsit5 (fifth order Runge Kutta) generally does the job,…

---

## [Differential equation with decimal exponent causing error](https://discourse.julialang.org/t/differential-equation-with-decimal-exponent-causing-error/59909)

<div class="topic-metadata">

**Author:** [@Peter\_Uhl](https://discourse.julialang.org/u/Peter_Uhl)\
**Replies:** 9\
**Last updated:** [April 29, 2021, 7:45am UTC](https://discourse.julialang.org/t/differential-equation-with-decimal-exponent-causing-error/59909 "2021-04-29T07:45:06Z")

</div>

I’m trying to solve an ode with a decimal exponent. The exponent sometimes gives a complex result which causes a domain error: LoadError: DomainError with -31175.19768524835: Exponentiation yielding a complex result re…

---

## [Updating Packages](https://discourse.julialang.org/t/updating-packages/60222)

<div class="topic-metadata">

**Author:** [@statspy](https://discourse.julialang.org/u/statspy)\
**Replies:** 2\
**Last updated:** [April 29, 2021, 6:38am UTC](https://discourse.julialang.org/t/updating-packages/60222 "2021-04-29T06:38:00Z")

</div>

Why my DataFrame package does not update from ( 0.22.7 to 1.0) when I use: pkg\> update or pkg\>update DataFrames How do I update packages? Thanks

---

## [Problem placing views into an array](https://discourse.julialang.org/t/problem-placing-views-into-an-array/60118)

<div class="topic-metadata">

**Author:** [@Based](https://discourse.julialang.org/u/Based)\
**Replies:** 3\
**Last updated:** [April 29, 2021, 4:58am UTC](https://discourse.julialang.org/t/problem-placing-views-into-an-array/60118 "2021-04-29T04:58:57Z")

</div>

When I add a view into an array, it creates a copy of it instead of creating a reference to the original view. Modifying the view does not modify the array it was added to. This is not the case when the array is not a vi…

---

## [How to return a Symmetric matrix?](https://discourse.julialang.org/t/how-to-return-a-symmetric-matrix/60212)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 10\
**Last updated:** [April 29, 2021, 4:58am UTC](https://discourse.julialang.org/t/how-to-return-a-symmetric-matrix/60212 "2021-04-29T04:58:08Z")

</div>

I’m constructing the Hessian of the Rosenbrock function. I want the return of h! to be of type Symmetric. using LinearAlgebra # for completeness function f(x; a=1, b=100) (a - x\[1\])^2 + b\*(x\[2\] - x\[1\]^2)^2 end fun…

---

## [Event handler](https://discourse.julialang.org/t/event-handler/59937)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 11\
**Last updated:** [April 29, 2021, 12:46am UTC](https://discourse.julialang.org/t/event-handler/59937 "2021-04-29T00:46:44Z")

</div>

I have a number of functions, all looking a bit like that: while true i = peel(Q) if i == 1 && mode = 1 a, b = dosomething1(a, b) elseif i == 2 b, c = dosomething2(b, c) elseif i == 3 …

---

## [Did Julia code loading in distributed computing changed?](https://discourse.julialang.org/t/did-julia-code-loading-in-distributed-computing-changed/60202)

<div class="topic-metadata">

**Author:** [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Replies:** 6\
**Last updated:** [April 28, 2021, 9:47pm UTC](https://discourse.julialang.org/t/did-julia-code-loading-in-distributed-computing-changed/60202 "2021-04-28T21:47:46Z")

</div>

Importing a module after addprocs() seems to try to load it an all workers. (@v1.6) pkg\> activate . Activating environment at \`C:\\Users\\blablabla...\\Project.toml\` (MyProject) pkg\> status Project BoseHubbardLyapu…

---

## [Counting missing in a dataframe](https://discourse.julialang.org/t/counting-missing-in-a-dataframe/60186)

<div class="topic-metadata">

**Author:** [@statspy](https://discourse.julialang.org/u/statspy)\
**Replies:** 6\
**Last updated:** [April 28, 2021, 9:00pm UTC](https://discourse.julialang.org/t/counting-missing-in-a-dataframe/60186 "2021-04-28T21:00:56Z")

</div>

Lets say i have the following dataframe: df=DataFrame(A=\[1,2,missing\], B=\[10,missing,missing\]) I need to count how many missing’s in each column and get the result like this: A(1), B(2) i tried: collect(ismissing(x)…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=604)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=606)
