'using R to run a formula

I am new to R and want to apply this formula in standard R. it works fine when i put the value for OR and P. SE<-abs(log(OR)/qnorm(P/2))

however instead of actual value, I want to first upload a file that has a column of OR and P (header) for many. i try this:

mydata <- read.csv("myfile", header=TRUE, sep="\t") SE<-abs(log(OR)/qnorm(P/2)) write.csv (SE, file="SEtest")

it gives error that object OR is not found. appreciate helps!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source