Re: [R] Tools to modify highlighted areas in pdf documents?

2024-06-03 Thread Leo Mada via R-help
Dear Ivan,

Thank you very much for the hint. I have started to test it.

- it offers more colours and types of highlighting than MS Edge;
- it seems to have better word-boundary detection than MS Edge (but I haven't 
tested all the cases yet);


There are some nit-picks:
- I wish it had a better default color-pallet;
- the vertical positioning continues to be sometimes sub-optimal: editing 
manually the coordinates may be still useful;

Returning to R:
1. Some of the pdf-packages could implement some of the 
annotation-functionality as well.

2. It would be useful to be able to export the annotations and import/merge 
them in another document. I have spotted errors in various articles; such a 
functionality would be handy, if a new version of those articles gets published.

Sincerely,

Leonard

From: Ivan Krylov 
Sent: Sunday, June 2, 2024 8:02 PM
To: Leo Mada via R-help 
Cc: Leo Mada 
Subject: Re: [R] Tools to modify highlighted areas in pdf documents?

� Sat, 1 Jun 2024 16:16:23 +
Leo Mada via R-help  �:

> When highlighting pdf-documents with Microsoft Edge, the bounding box
> is sometimes misplaced, and quite ugly so. It also lacks the ability
> to draw lines or arrows.
>
> On the other hand, I did not get used to Acrobat Reader: it usually
> involves much more effort to add specific highlights. Lines can be
> drawn, but are NOT straight!

Sorry for answering a different question, but have you considered using
a different PDF viewer + annotation application? Okular
 is free and available on Windows (including
from outside Microsoft store). Its annotation features include all
kinds of highlights, arrows and lines, both straight and
arbitrarily-shaped, quickly available from the "annotations" panel.

--
Best regards,
Ivan

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] [R-pkgs] QGA 1.0 is released

2024-06-03 Thread Giulio Barcaroli
Dear R users,

I am pleased to announce that QGA 1.0 is now available on CRAN.

QGA implements the Quantum Genetic Algorithm, as proposed by Han and Kim 
in 2000, and is an R implementation derived from the Python one by 
Lahoz-Beltra in 2016.

Under this approach, each solution is represented as a sequence of 
(qu)bits. Simulating the quantum paradigm, these qubits are in a 
superposition state: when measuring them, they collapse in a 0 or 1 
state. After measurement, the solution's fitness is calculated as in 
usual genetic algorithms.

The evolution at each iteration is oriented by the application of two 
quantum gates to the amplitudes of the qubits: (1) a rotation gate 
(always); (2) a Pauli-X gate (optionally). The rotation is based on the 
theta angle values: higher values allow a quicker evolution, and lower 
values avoid local maxima. The Pauli-X gate is equivalent to the 
classical mutation operator and determines the swap between alfa and 
beta amplitudes of a given qubit.

The package has been developed in such a way as to permit a complete 
separation between the 'engine', and the particular problem subject to 
combinatorial optimization. This is evident in the available examples, 
that come with the package, illustrating the application of QGA to 
different problems: knapsack, traveler salesman, and clustering.

Thank you, kind regards,

Giulio Barcaroli

[[alternative HTML version deleted]]

___
R-packages mailing list
r-packa...@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-packages

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R code for overlapping variables -- count

2024-06-03 Thread Ebert,Timothy Aaron
One could make dummy variables if the existing variables are otherwise. If 
Female is a variable that includes other options (no-response, non-binary, ...) 
then recode it using dummy.female and the others would be similarly named.

-Original Message-
From: R-help  On Behalf Of peter dalgaard
Sent: Monday, June 3, 2024 5:02 AM
To: Shadee Ashtari 
Cc: r-help@r-project.org
Subject: Re: [R] R code for overlapping variables -- count

[External Email]

If they are binary (0/1 dummies), can't you just "&" them as in

table(Female & USA & MidIncome)

(or sum() if you don't care about the number of 0s)

-pd

> On 2 Jun 2024, at 00:31 , Shadee Ashtari  wrote:
>
> Hi!
>
> I am trying to find the code for how to get counts for intersectional
> variables. For example, I have three unique categorical variables --
> "Female," "USA," and "MidIncome" -- and I'm trying to see how many
> people I have at the intersection of the three.
>
> Thank you so much,
> Shadee
>
>   [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat/
> .ethz.ch%2Fmailman%2Flistinfo%2Fr-help=05%7C02%7Ctebert%40ufl.edu
> %7C66abf8af810348ed21b408dc83abdfd6%7C0d4da0f84a314d76ace60a62331e1b84
> %7C0%7C0%7C638530021430818928%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=
> a2oUZzOdXDHnzPA3Oo98DIp%2BFIqpg5o1fT0fcE%2BvkQI%3D=0
> PLEASE do read the posting guide
> http://www.r/
> -project.org%2Fposting-guide.html=05%7C02%7Ctebert%40ufl.edu%7C66
> abf8af810348ed21b408dc83abdfd6%7C0d4da0f84a314d76ace60a62331e1b84%7C0%
> 7C0%7C638530021430825783%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=L2I%2
> BxXV3kHZUwflUx0%2BGrakGbbOV6AWV7dul7%2FyuIBU%3D=0
> and provide commented, minimal, self-contained, reproducible code.

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 
Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.r-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R code for overlapping variables -- count

2024-06-03 Thread peter dalgaard
If they are binary (0/1 dummies), can't you just "&" them as in 

table(Female & USA & MidIncome)

(or sum() if you don't care about the number of 0s)

-pd

> On 2 Jun 2024, at 00:31 , Shadee Ashtari  wrote:
> 
> Hi!
> 
> I am trying to find the code for how to get counts for intersectional
> variables. For example, I have three unique categorical variables --
> "Female," "USA," and "MidIncome" -- and I'm trying to see how many people I
> have at the intersection of the three.
> 
> Thank you so much,
> Shadee
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.