847 questions
0
votes
0
answers
8
views
why st_dev in stat structure is somewhat difference with the output of the command stat
i use stat() system call, and st_dev and st_rdev gives me somethong about device id that is fe02 and 0
command line stat gives me Device: fe02h/65026d
why there is a difference? or is my code wrong?
...
0
votes
0
answers
3
views
setting st_birthtime in macOS
In macOS, I want to set st_birthtime to a date before 1970/01/01.
For instance date = '1953/12/02 00:00:01'.
N.B.st_birthtime is the fourth date displayed by shell command > stat my/file.txt
I ...
2
votes
1
answer
50
views
How to calculate a sample size for non inferiority test two samples?
I have a test where I want to check whether the install rate of tests group is at least 70% of controls group. To do so I took the following function from Python libraries
alpha = 0.1
power = 0.80
...
0
votes
0
answers
70
views
stat_compare_means() for multiple factors in faceted ggplot data
I am trying to add a p-value (t-test pairwise) across subgroups of data. See the example figure.
The following figure is group into groups and subgroups.
code:
SUAC_cv <- function(x, na.rm = FALSE)...
0
votes
1
answer
104
views
how to calculate average daily balance - current cycle
I have this data and i want to calculate,
average daily balance - current cycle: $1,595.49.
I try mean median mode and manulay sum / T rows but all results different
fd tr_type amount date ...
0
votes
1
answer
68
views
Friedman test using gtsummary
I'm trying to perform frideman test inside and add_p() function added to tbl_summary()
The problems is that frideman test assumes complete blocks
So I added it as a function to exclued uncomplete ...
0
votes
0
answers
25
views
Docker SDK for Python - `mode` field in output of `Container.get_archive(path)` returning unexpected value when `path` is a folder
In the Docker SDK for Python, Container.get_archive(path) returns stat information of path in a dictionary.
However, when path is a folder, the mode of the stat dictionary is set to 2147484141, which ...
0
votes
0
answers
28
views
Generate three correlated variables in R [duplicate]
I want to simulate three variables e1, e2 and e3 that are not independent of each other. The population mean of each variable must be 0 and each follows a normal distribution. Since they are not ...
2
votes
0
answers
54
views
Good way to understand if file has been just created rather than modified in Linux
I need a way to learn if a file has been just created (rather than e.g. modified). I do it like this:
const bool isCreated =
((f.atime.tv_sec == f.mtime.tv_sec) &&
...
0
votes
2
answers
77
views
rounding to nearst 0 or 5 in n (add_n()) gtsummary outputbale
I need help in rounding the last digit to 0 or 5 in n column from add_n() in my gtsummary output table. any help is much appreciated
library(tidyverse)
library(gtsummary)
round_05 <- function(x) {
...
0
votes
1
answer
62
views
rounding to nearst 0 or 5 in gtsummary outputbale
I need help in rounding the last digit to 0 or 5 in my gtsummary output table. any help is much appreciated
library(tidyverse)
library(gtsummary)
data %>%
tbl_summary(
by = hba1c,
include = -...
1
vote
1
answer
60
views
what's diffrent of geom_histogram about statistical transformations
i have no idea with the difference between statistical transformations about plot1 and plot2 ?
plot1 <- ggplot(mpg, aes(x = hwy)) +
geom_histogram(stat = "density")
plot2 <-ggplot(...
0
votes
0
answers
8
views
Number of Observations
I am trying to establish relationship between an organisation’s degree of diversity representation and their annual revenue, and ran into a concern in my data analysis.
If I am looking at the number ...
0
votes
0
answers
59
views
is anyone add statisctic columns successfully using add_stat function for tbl_continuous objects( not tbl_summary)?
is anyone add statisctic columns successfully using add_stat function for tbl_continuous objects( not tbl_summary)?
by using add_stat, we can custom statistic columns for tbl_summary() objects as ...
0
votes
0
answers
39
views
X86-64 assembly syscall statx
I have a problem with _statxFlow. I try to call statx and save GID in uidGidRecieved. I don't know what the problem is (well, besides that _print is not suited for integers, but that's I have already ...
1
vote
1
answer
64
views
file creation time system call in linux/gcc
As I know, stat/fstat system call tell us only 3 times about a file
Time of last access (st_atim field)
Time of last modification (st_mtim field)
Time of last status change (st_ctim)
and when I run ...
0
votes
1
answer
41
views
How to fix 'variable lengths differ' error?
This is my code:
Income.x1 <- ifelse(Income ==1, "L", ifelse(Income == 2, "M",ifelse(Income == 3, "H",NA)))
gender.x2 <- ifelse(Gender==1, "M",ifelse(...
0
votes
0
answers
182
views
compute Sobol first order index
I am trying to compute Sobol index by myself using python but I am facing some problems. The formula is very simple however I don't understand some part :
Here, E[Y|Qi] denotes the expected value of ...
0
votes
3
answers
122
views
How can I detect an existing directory in ~/ with stat in C?
If the directory ~/testdir not exists, I want to create it.
Before the test, I create the directory ~/testdir, but stat is not detecting it, and the program tries to create it once more.
I only has ...
-2
votes
1
answer
218
views
WinSCP stat command says FileNotFound, but it exists when I do ls
When I run this in PowerShell where $File is just "/path/to/FileName.csv"
& "C:\Program Files (x86)\WinSCP\WinSCP.com" /command "open sftp://username:password@server/"...
0
votes
0
answers
29
views
Data not replicating using logical replication
Not able to see replicated data on device Although it is showing in sync state and the is showing the process is running but data is not replicated I have done logical replication I have trying since ...
0
votes
0
answers
45
views
Subset rows within one predictor in GLM without disturb other
I fit parasitoid abundance to two factors, flower availability and distance of the crop to flower.
Firstly, I fit separate glm equation:
glm(abundance ~ flower, data = data, family = poisson(link"...
1
vote
2
answers
352
views
How to fail Ansible playbook if filesize is zero (0)
How this playbook should work? I would like playbook to fail when filesize is zero
---
- hosts: localhost
gather_facts: no
tasks:
- name: "Get stats of a file"
stat:
...
0
votes
0
answers
29
views
Error in match.arg(opt.crit) : 'arg' must be NULL or a character vector
I have an code but it have an error In R, I do not know how to run it.
enter image description here
And here should be run out like this enter image description here
library(forecast)
library(itsmr)
...
0
votes
1
answer
102
views
How to implement after_stat(ymax) with count expression in r?
I would like to add n numbers to each ggplot box plots with the italic(n) = #.
I have tried expression and bquote for label but did not work. Any suggestion?
stat_summary(fun = median, fun.max = ...
0
votes
1
answer
79
views
Overlay bar chart in Age standardised mortality rate graph in ggplot in r
I have age-standardized mortality rates with a 95%CI graph in a ggplot, is there any way I can add a number of deaths by year in this graph? I thought of showing this as a bar chart by adding a second ...
1
vote
1
answer
29
views
I want to create a separate bar chart but only one bar appears and it looks like they add together, dodge doesn't work
I don't know why all the time the bar chart is not separated, I want to do a comparation between temperature and male-female floration monthly but dodge doesn't work.
enter image description here
year ...
-2
votes
1
answer
303
views
Unable to get stat of existing directory in Ansible due to variable formatting issue
I'm trying to get the owner of the first directory passed to Ansible variable source_files.
We do not have control over the content of Ansible variable source_files as it is constructed through some ...
1
vote
1
answer
176
views
object not found in mediation model
I have to plan a simple mediation model - https://cran.r-project.org/package=mediation
library(mediation)
mediation_model = lm(as.numeric(Age) ~ as.numeric(condition), data = GRA)
tab_model(...
-1
votes
3
answers
91
views
How to merge data based on column of specific data in r
I have three data, every data contain one column and the same rows but in diffrent orders in all the five data, i want to merge the five data based on the first column.
column1
X 7
B ...
1
vote
1
answer
1k
views
Error with adding p-values using stat_pvalue_manual into a ggplot [duplicate]
I have a problem with stat_pvalue_manual. They showed an error whenever I ran it with stat_pvalue_manual function. I tried to use stat_compare_means, but it is wrong with p.adj value, so I need to ...
0
votes
0
answers
34
views
How to calculate the 2019 WHO Cardiovascular Risk using R?
How can I calculate the 2019 WHO Cardiovascular Risk using R programming language? Is there a package? There is a R code to calculate the 2007 WHO Cardiovascular Risk chart and I can't find an updated ...
0
votes
1
answer
254
views
label position in stat_bin for geom_histogram: how to adress ..count.. in the position_nudge method?
I've got input_values as a tibble:
input_values
For these alues I'd like to plot a histogram, where the columns are labeled (90° angle, almost directly on top of the colums).
as_tibble(input_values) %&...
1
vote
1
answer
459
views
in R, draw LDA and QDA partition lines on the same plot
I have trouble understanding how to 'export' equations of the delimitation lines resulting from a linear (LDA) or quadratic discriminant analysis (QDA) in R.
Ideally, I would like to compare both ...
1
vote
0
answers
1k
views
Get Directory Disk Usage with Golang
I try to learn disk usage of directory with golang but this below app calculate incorrect. I do not want to use filepath.Walk. I tried os.Stat() but that did not get actual directory size. I shared ...
0
votes
0
answers
83
views
Portable way to read symlink destination in shell [duplicate]
Is there a way to portably (at least Linux and macOS) get the destination of a symlink in a (Posix) shell script?
In an old program, I found
ls -lad "bin" 2> /dev/null | awk '{ printf (&...
1
vote
1
answer
188
views
_wstat for extended-length path prefixed with \\?\ in MINGW64
Description
I have a C program that needs to check if a file exists using stat. That file can have a path longer than MAX_PATH (260 characters) and is therefore prefixed with \\?\, see Windows ...
1
vote
0
answers
98
views
Why does st_blksize differ when using fstat on STDOUT_FILENO compared to stat on a regular file?
Why st_blksize differ for regular file and stdout?
I write a little program, where there's a lot of output.
There was decision on my part to move aside stdio.h and FILE struct and use some syscalls.
...
0
votes
3
answers
71
views
extracting selected estimate and CI from a linear mixed model
I need help in extracting estimate and CIs only for yr_qun variable from my linear mixed model. when I run the following code I get
Error:
! Tibble columns must have compatible sizes.
• Size 30: ...
0
votes
1
answer
153
views
fread is reading the last part of my text file twice
I have a text file I want to read into an std::vector. It's okay if the vector is a little too big, but it seems to be doing a very weird thing: It's copying the entire file, then copying a portion ...
0
votes
1
answer
200
views
Permission denied when using nginx
I started nginx in alamalinux 9.1 and when I visit the site, I got 404 errors, and I also found some errors in log files like 2023/05/06 16:14:33 [crit] 248989#248989: *15900 stat() "/root/...
0
votes
1
answer
240
views
stat function not returning proper result in st_size
I have a strange scenario where the stat function is providing the file size always as 4096.
Below is the code snippet:
#include <iostream>
#include <sys/stat.h>
using namespace std;
int ...
0
votes
1
answer
282
views
how to get directory size with flutter?
I'm using flutter and I want to know the capcity size of a directory.
this is my code :
final String directory = (await getApplicationSupportDirectory()).path;
My question is how to get directory ...
2
votes
2
answers
290
views
Recursively get file size and file path of images in a folder, except certain subfolders
I would like to get a directory path. From there, I'd like to return the file size and filepath for designated image types within the root and subdirectories, but excluding images within ...
2
votes
2
answers
867
views
I got slightly different qq plots in R and Python for the same data. Which one should I rely on?
This is my data:
x = c(2.42, 2.59, 3.5, 2.75, 2.78, 3.58, 2.95, 2.06, 2.36, 2.48, 3.33, 2.89)
I got this qq plot from R:
qqnorm(x)
qqline(x)
Meanwhile, for the same data, I got the following qq ...
1
vote
2
answers
112
views
statistical test (wilcox or t-test, or any, really) in a "group_by" pipe
I have a dataset looking at water quality for various conditions. Here is a subset of the data (called tempdf1:
Material Unit Condition Rep Measurement
1 Bromine ppm Unfiltered 1 4....
2
votes
2
answers
226
views
Differentiating between files and directories on linux in C
I have a function that takes in an argument which is a file path. That path is then used in conjunction with the readdir function and stat function to print out all of the files and directories in a ...
0
votes
0
answers
117
views
Storage Access Framework - getting file attributes rwx, c++ stat replacement
I have a native c++ application. I migrate it to new google's storage restrictions. User grants read/write permissions on some folder with files inside. Somehow has happened that some files inside ...
-1
votes
2
answers
149
views
wanna to read hdf file in dataframe
gss = pd.read_hdf('gss.hdf5', 'gs')
this the code i have used on VS code. and i got this
Traceback (most recent call last):
File "d:\pthon_txt\t.py", line 4, in <module>
gss = pd....
1
vote
2
answers
164
views
How to set the stat_function in for loop to plot two graphs with normal distribution, central and variance parameters
I would like to create the following plots in parallel
I have used the following code using the wide format dataset:
sumstatz_1 <- data.frame(whichstat = c("mean",
...