similar to: Is this correct?

Displaying 20 results from an estimated 2000 matches similar to: "Is this correct?"

2004 Oct 21
2
How to calculate a double integral ...?
Dear R-Friends, How can I calculate a double integral like \int_a^b \int_c^y g(x, y) dx dy where a, b, c are constants, g(x, y), e.g., g(x, y) = tan(x + y). I tried to nested integrate() and adapt(), but none of them working, seemingly due to the limits can not be specified constants. Best regards, C. Joseph Lu Department of Statistics National Cheng-Kung University Voice:
2002 Aug 06
1
Questions about lexical scope
Dear R-users, The numerical integration example given in Gentleman and Ihaka (2000), "Lexical Scope and Statistical Computing," JCGS, 9, 491-508, is very interesting and helpful in understanding how lexical scope is about. However, I got some questions that I just can't figure out. First all, allow me to copy the two functions given by the authors: midpoint <- function(f, a,
2000 Aug 04
1
xlab=expression(...) won't work.
Dear all, I found that the plotmath seems won't work on xlab in plot (and other plot functions including matplot, contour, ...): > plot(1:10, 1:10, xlab=expression(alpha)) the plot shows nothing for x-label. My R-version is R.1.1.0 > version _ platform Windows arch x86 os Win32 system x86, Win32 status major 1
2003 Feb 19
2
plotmath
There's something (probably a lot) missing in my understanding of plotmath. The LaTeX code for what I'm trying to produce is \log(-\log(\hat R)) My (probably hopeless) attempt at it uses nested group()s: expression(plain(log) * group("(", -plain(log)*group("(", \hat(R), ")"), ")")) Can anyone do it right for me, please? Thanks, Ted. Dr E.A.
2002 Sep 08
2
Error on "Load source file" of iESS
Dear R and ESS users, I got the following error when trying to load a source file (smart.R in directory E:\R\) into XEmacs through the menu iESS and "Load source file": Error in file(file, "r") : unable to open connection In addition: Warning message: cannot open file `E:Rsmart.R' It seems the slash "/" or "\" being missing, but I don't know
2007 Oct 31
2
R GUI for Linux
I have downloaded and tried to install JGR - Java GUI for R - Version 1.5. I followed all the instructions (at least in my best resolution) and installed Java latest version. R installation complete fine. Has anyone succeded in installing JGR on SuSE 10.3 ? In the following I hade detailed the failed installation, As root /i did the following: linux-Mimin:/usr/local/bin # ./R R version 2.6.0
2001 Sep 18
1
textbook on experimental design?
I'll be teaching a graduate course on (the analysis of) experimental designs next year, using R. Does anyone know of a suitable textbook? (Venables and Ripley MASS Ch6 on Linear Models covers roughly the right material, but at a level that is way too difficult for my students.) Sorry if this has been asked before. I've looked through the archives and found Julian Faraway's book, but
2001 Feb 13
3
xfig boxplot (polygon) bug??
There appears to be a bug in the R xfig() driver. When I run a simple example, eg > data(InsectSprays) > boxplot(count ~ spray, data = InsectSprays, col = "lightgray") the boxplot is fine. Doing the same thing after > xfig(file='test.fig') and then opening in Xfig (ver3.2 patchlevel 2) on my Linux box produces boxplots where the boxes, although correctly shaded in,
2001 Feb 13
3
xfig boxplot (polygon) bug??
There appears to be a bug in the R xfig() driver. When I run a simple example, eg > data(InsectSprays) > boxplot(count ~ spray, data = InsectSprays, col = "lightgray") the boxplot is fine. Doing the same thing after > xfig(file='test.fig') and then opening in Xfig (ver3.2 patchlevel 2) on my Linux box produces boxplots where the boxes, although correctly shaded in,
2005 Aug 30
2
about "pnorm"
As to the function"pnorm",the default degree of freedom(df) is infinite. I wanna know how to set the df as I want. Help on pnorm doesn't have df setting.The only choice are:"mean, sd, lower.tail, log.p",but no df. For instance: sample size=6 df=6-1=5 t value=9.143 I wanna to the corresponding p value by using function "pnorm". How can I do it? Thanks a lot
2006 Aug 28
3
Firefox extension fo "R Site Search"
Dear useRs, ================================================= Search for your R routines directly from Firefox! >> http://addictedtor.free.fr/rsitesearch ================================================= Mango Solutions, providers of R and S-Plus consulting, application development and training, are happy to announce the first release of the R Site Search extension for Mozilla Firefox.
2007 Apr 23
2
Problem with dgamma ?
Hi All, Here 's what I got using dgamma function : > nu<-.2 > nu*log(nu)-log(gamma(nu))+(nu-1)*log(1)-nu*(1) [1] -2.045951 > dgamma(1,nu,nu,1) [1] 0.0801333 > dgamma(1,nu,nu,0) [1] NaN Warning message: NaNs produced in: dgamma(x, shape, scale, log) Could anyone tell me what is wrong here ? I am using R-2.4.1 on windows XP. Thanks a lot.
2007 Apr 02
1
?Bug: '&&' and '&' give different results?
"&&" seems to behave strangely and gives different results from "&" e.g. in a data frame selection (regardless whether terms are bracketed)? ===========Script======================= test=data.frame(gender=c("F","M","M","F","F"),side=c("R","L","R","L","R")) test
2005 Nov 01
5
Unexpected result from binary greater than operator
Hi All, I recently encountered results that I did not expect, exhibited by the following code snippet: test <- function() { minX <- 4.2 min0 <- 4.1 sigmaG <- 0.1 Diff <- minX-min0 print(c(Diff=Diff,sigmaG=sigmaG)) cat("is Diff > sigmaG?:", Diff > sigmaG,"\n") cat("is (4.2 - 4.1) > 0.1?:",(4.2 - 4.1) >
2007 Oct 24
3
multiply for vector in R
Dear All, Is there a conmand to calculate the multiplication of the elements in a vector? For example: a=c(1,2,3,4) I want to get 1*2*3*4=24. Because the dimension of the vector is high, I want to know there is a command for this task in R? Thank you so much! Kang __________________________________________________ [[alternative HTML version deleted]]
2007 Apr 23
1
Extracing "Interval of Time" in seconds in R
Dear List, I want to let R calculate the time (run-time) it requires to run a self-written simulation function. I tried as follows: it enables me to see the starting and finishing time points. ############################# "sim.result" <- function(nsim, ...){ Starting <- date() ... # calculations # final.result <- ... # Output for display # cat("# of Iterations used
2007 Jun 18
2
Calculating Percentile in R
Hi all, I have a problem on how R calculates Percentiles : Suppose I have following data set: > data1 [1] -16648185 -14463457 -14449400 -13905309 -13443436 -13234755 -12956282 -11660896 [9] -10061040 -9805005 -9789583 -9754642 -9562164 -9391709 -9212182 -9151073 [17] -9092732 -9068214 -8978151 -8943912 -8761890 -8632106 -8541580 -8501249 [25] -8234466 -8219015
2005 Oct 04
3
Problem reading in external data and assigning data.frames within R
Hey there, I apologize if this is an irritatingly simple question ... I'm a new user. I can't understand why R flips the sign of all data values when reading in external text files (tab delimited or csv) with the read.delim or read.csv functions. The signs of data values also seem to be flipped after assigning a new data.frame from within R (xnew <-- edit(data.frame()). What am
2007 Jul 17
3
logical operators priority
Dear R-users, I haven?t found rules for logical operators. I need to select data according the following rule: Condition A & (Condition B | Condition C) How should I write it?? Is Condition A & Condition B | Condition C correct or will R execute (Condition A & Condition B) | Condition C ? Thanks for your help. Delphine Fontaine Delphine Fontaine Statistician Statistics
2007 Feb 15
4
integrate over polygon
Hi there, I want to integrate a function over an irregular polygon. Is there any function which can implement this easily? Otherwise, I am thinking of divide the polygon into very small rectangles and use "adapt" to approximate it. Do you have any suggestions to get the fine division? Any advice is appreciated. Haiyong