gtsummary , 5 point complex survey design scale and median

I am trying to use the tbl_svysummary for a likert scale survey ordinal data: “very bad”, “bad”, “moderate”, “good”, “very good” and I have five such questions are there. I need to summaries the median. Could not find any example You can use the tbl_likert() function for this from the bstfun package (which includes gtsummary … Read more

How to change colors and font of treemap labels

I would like to change the color of the labels on the darkest rectangles of my treemap to white to increase readability. Is there a way to do this? I also would like to change the font of my labels. Ideally I would like the font to match the base R default font (I’m not … Read more

How to return proper value from a class method

I know the question is probably simple for most of you, but I’ve been stuck for a whole day to solve this dilemma. I think that the problem is in setCurrent(book) or in finishCurrentBook method. Their tasks are: setCurrent(book) – makes the book currently being read in the library, initializes the currentBook field of the … Read more

What is the reason for the odd syntax of [[maybe_unused]] on type aliases?

Since C++17, there is now a standardized way to politely suggest the compiler to stop yelling aboud unused entities. When applying this to variables, functions, and old-skool type-aliases, we have to use the expected syntax which comes in the form: [[maybe_unused]] int x; [[maybe_unused]] void f(); [[maybe_unused]] typedef void t; Nothing strange here. However, when … Read more

Error using shadcn-ui to add a button in a Next.js TypeScript project

I encountered an error while attempting to add a button using the npx shadcn-ui@latest add button command in a Next.js TypeScript project. The error message is as follows: SyntaxError: Unexpected token ‘?’ at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18) at async link (internal/modules/esm/module_job.js:42:21) I am working on a Next.js project with TypeScript, and I tried to add a button … Read more