如何计算R中的相对风险?
在输入我有
names(DS)
Tab<-table(DS[,5],DS[,11],DS[,3])
No Yes
No 4 16
Yes 40 168
Run Code Online (Sandbox Code Playgroud)
我是R编程语言的新手......
为什么修改ptr对vector没有影响?我试图通过f函数改变值.
void f(int *ptr, int size, int value){
ptr=(int* )malloc(sizeof(int));
if(ptr!=NULL){
int i;
for(i=0;i<size;i++)
*(ptr + i) = value;
}
}
int main (void)
{
int *vector = NULL;
f(&vector, 3, 324);
printf("%p\n", vector);
}
Run Code Online (Sandbox Code Playgroud)