[R] help with expression()
Hello. I have a vector and within that vector is one expression. When I display this vector it comes up as expression(NA_character_, NA_character_, Null Effect, Pooled effect, NA_character_, NA_character_, NA_character_, NA_character_, NA_character_, paste(Het Contours , I^2, sep = ), 0.4, 0.41, 0.42, 0.45, NA_character_) Where the part in bold is the element which is an expression. How do I change this vector to a standard format what I can manipulate in the usual way? -- View this message in context: http://www.nabble.com/help-with-expression%28%29-tp25004374p25004374.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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] axis on a non-uniform scale
hi everyone, just wondering how i might go about plotting a graph (say using the plot() function) where my x axis is plotting points which have Log(values) but i want my x axis to display values in exponentiated form ie. my log values (also scale of the x axis) x axis displays -1 exp(-1) = 0.36 0 exp(0) = 1 1 exp(1) = 2.72 2 exp(2) = 7.39 ...etc -- View this message in context: http://www.nabble.com/axis-on-a-non-uniform-scale-tp24032916p24032916.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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] funnel plots
for the function funnelplot(), how do I include 95% confidence intervals for the effect estimate ( ie. / \ )? -- View this message in context: http://www.nabble.com/funnel-plots-tp24003106p24003106.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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 with error
while (theta1!=theta) {...} gives the error message: Error in while (theta1 != theta) { : missing value where TRUE/FALSE needed but when i extract theta1!=theta and paste it into the console it comes up with the output TRUE which contradicts the error message- im not sure what I am doing wrong -- View this message in context: http://www.nabble.com/help-with-error-tp23623932p23623932.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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] what is wrong with this code?
dlogl - -(n/theta)-sum((y/(theta)^2)*((1-exp(y/theta))/(1+exp(y/theta))) d2logl - (n/theta^2) - sum((-2y/theta^3)*(1-exp(y/theta))/(1+exp(y/theta))) - sum(((2*y/theta^4)*exp(y/theta))/((1+exp(y/theta))^2)) returns the error message: Error: unexpected symbol in: dlogl - -(n/theta)-sum((y/(theta)^2)*((1-exp(y/theta))/(1+exp(y/theta))) d2logl do you know what i have done wrong -- View this message in context: http://www.nabble.com/what-is-wrong-with-this-code--tp23623227p23623227.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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 with as.numeric
hi everyone, wondering if you could help me with a novice problem. I have a data frame called subjects with a height and weight variable and want to calculate a bmi variable from the two. i have tried: attach(subjects) bmi - (weight)/((height/100)^2) but it comes up with the error: Warning messages: 1: In Ops.factor(height, 100) : / not meaningful for factors 2: In Ops.factor((weight), ((height/100)^2)) : / not meaningful for factors I presume that this means the vectors height and weight are not in numeric form (confirmed by is.numeric) so i changed the code to: bmi - (as.numeric(weight))/((as.numeric(height)/100)^2) but this just comes up with a result which doesnt make sense i.e. numbers such as 4 within bmi vector. Ive looked at as.numeric(height)/as.numeric(weight) and these numbers just arnt the same as height/weight which is the reason for the incorrect bmi. Cant anyone tell me where I am going wrong? Its quiet frustrating because I cant understand why a function claiming to convert to numeric would come up with such a bizarre result. -- View this message in context: http://www.nabble.com/help-with-as.numeric-tp23558326p23558326.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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] displaying results
Hi everyone, can anyone tell me how i can change how i display mean(age), i want it to say The mean age of patients within the sample is mean(age) -- View this message in context: http://www.nabble.com/displaying-results-tp23558890p23558890.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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.