Publications by Stéphane Laurent

Matrices with fixed row and column sums

06.06.2024

Given two vectors \(p\) and \(q\) of non-negative integer numbers, denote by \(A(p, q)\) the number of matrices with non-negative integer entries whose row sum and column sum respectively are \(p\) and \(q\), and denote by \(B(p, q)\) the number of matrices with entries in \(\{0, 1\}\) whose r...

3589 sym R (730 sym/1 pcs)

Four-dimensional torus knots

12.05.2024

Here is a parameterization of a four-dimensional torus knot: \[ p(\theta, \phi) = \begin{pmatrix} \cos\theta \cdot \cos\phi \\ \cos\theta \cdot \sin\phi \\ \sin\theta \cdot \cos 3\phi/2 \\ \sin\theta \cdot \cos 3\phi/2 \end{pmatrix} \] It takes its values in the 3-sphere. We use the stereographic projection ...

1899 sym R (1779 sym/3 pcs) 4 img

Jack polynomials with symbolic parameter

15.04.2024

Nice achievment: I have been able to implement the Jack polynomials with a symbolic Jack parameter, in Haskell and in R. My Julia package JackPolynomials, a couple of years old, allows to get them as well: julia> using JackPolynomials julia> JackPolynomial(2, [3; 1]) (2*alpha^2 + 4*alpha + 2)*x_1^3*x_2 + (4*alpha + 4)*x_1^2...

5904 sym R (1195 sym/5 pcs)

An application of the resultant

14.03.2024

I will soon release an update of qspray on CRAN as well as a new package: resultant. This post shows an application of these two packages. Consider the two algebraic curves \(f(x,y)=0\) and \(g(x,y)=0\) where \[ f(x, y) = y^4 – y^3 + y^2 – 2x^2y + x^4 \quad \text{ and } \quad g(x, y) = ...

2277 sym R (1798 sym/8 pcs) 2 img

Using the ‘RowReorder’ extension in a Shiny app

29.01.2024

The ‘RowReorder’ extension of datatables is available in the DT package. This extension allows to reorder the rows of a DT table by dragging and dropping. However, if you enable this extension in a Shiny app for a table using the server-side processing (option server=TRUE in renderDT), that won’t work: ...

1911 sym R (1271 sym/2 pcs)

Confirmation dialog in a Shiny app

25.01.2024

Assume you have a Shiny app allowing to upload a data file and to perform various operations on the uploaded data. Now, if the user uploads a new file, the current state of the app is lost, and you want to warn the user about that. Here is a way using the amazing JavaScript library sweetalert2. The JavaScrip...

988 sym R (948 sym/2 pcs) 2 img

Icons in a Shiny dropdown input

03.01.2024

The function below generates a Shiny dropdown list including some icons. library(shiny) library(fontawesome) library(htmltools) selectInputWithIcons <- function( inputId, inputLabel, labels, values, icons, iconStyle = NULL, selected = NULL, multiple = FALSE, width = NULL ){ options <- mapply(function(label, value, icon){ list( "la...

638 sym R (4233 sym/2 pcs) 4 img

A R graphic in a Yesod app

01.12.2023

Yesod is a web framework for Haskell. In this post I show how to do a Yesod application allowing to upload some data from a CSV or a XLSX file and to display a R graphic representing two selected columns of the data. Below is the directory content of the application, available in this Github repository. | ...

3268 sym R (12004 sym/8 pcs) 2 img

Why is this hyperbolic background invariant?

19.11.2023

I have a mathematical question for you, because it is a mystery for me. Look at this animation: I get it as follows. Each frame corresponds to a value of \(t \in [0,3[\) (I take \(160\) values of \(t\) subdivising \([0,3[\)). Here is how I get the frame corresponding to one value of \(t\): ...

2757 sym 4 img

Conformal parameterization of the torus

13.10.2023

You can forget my post Mapping a picture on a donut or a Hopf torus. Almost everything I wrote in this post is wrong. I have even been unable to define what is the conformality property of a parameterization. Well, I don’t delete it because nevertheless it contains nice pictures. So let’s restart. Consid...

4047 sym R (2740 sym/5 pcs) 16 img