Re: [R] Error massage in attaching package 'rgl'
I am using 2.6.0 version in usual Windows-XP platform Duncan Murdoch <[EMAIL PROTECTED]> wrote: On 17/02/2008 8:15 AM, stat stat wrote: > Hi, > > I am getting following error message while attaching 'rgl' package : > >> library(rgl) > Error in get(Info[i, 1], envir = env) : internal error in R_decompress1 > > Can anyone tell me what should I do here? Not unless you give a proper error report. Versions? Platform? Duncan Murdoch thanks in advance - 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. [[alternative HTML version deleted]] __ 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] Error massage in attaching package 'rgl'
Hi, I am getting following error message while attaching 'rgl' package : > library(rgl) Error in get(Info[i, 1], envir = env) : internal error in R_decompress1 Can anyone tell me what should I do here? Regards, - 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. [[alternative HTML version deleted]] __ 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.
Re: [R] Error in if loop
Dear Mark, Thanks for this. Can you please explain me what is the difference between ifelse and if? generally if there is more than one syntax within the 'if' I use 'if' loop otherwise I use 'ifelse' loop. Is it the only difference between them? Mark Wardle <[EMAIL PROTECTED]> wrote: On 21/10/2007, stat stat wrote: > I have created a if loop as follows: > > name = "e" > if (name == "v") > { >u = 0 > } > else u = 1 > > however i am getting error : Error: unexpected 'else' in "else" There are 3 issues here: 1. Do you appreciate the difference between ifelse and if ? What are you actually trying to do - in this context, ifelse would usually be more sensible but as you've not said what you want to do, it is difficult to guess. 2. I don't get the same error as you. Which version of R are you using? > if (name=="v") + { + u=0 + } > else u=1 Error: syntax error This error message makes it clear that there is a syntax problem. In fact, look at the lefthand column of characters and you should see what the problem is 3. R is interpreting your code as two separate expressions because you are using an interactive shell. Try this instead: if (name=='v') { u=1 } else { u=0 } Hope this helps. Best wishes, Mark -- Dr. Mark Wardle Specialist registrar, Neurology Cardiff, UK thanks in advance - Forgot the famous last words? Access your message archive online. Click here. [[alternative HTML version deleted]] __ 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] Error in if loop
I have created a if loop as follows: name = "e" if (name == "v") { u = 0 } else u = 1 however i am getting error : Error: unexpected 'else' in "else" definitely I can write in : ifelse() form, however I want to write in this way. Can anyone tell me where is my error? thanks in advance - Forgot the famous last words? Access your message archive online. Click here. [[alternative HTML version deleted]] __ 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] Splines
I want to fit a cubic spline of x on y. where : x [1] 467 468 460 460 450 432 419 420 423 423 y [1] 1 2 3 4 5 6 7 8 9 10 using the syntax spline(y, x) I got following output : $x [1] 1.00 1.310345 1.620690 1.931034 2.241379 2.551724 2.862069 [8] 3.172414 3.482759 3.793103 4.103448 4.413793 4.724138 5.034483 [15] 5.344828 5.655172 5.965517 6.275862 6.586207 6.896552 7.206897 [22] 7.517241 7.827586 8.137931 8.448276 8.758621 9.068966 9.379310 [29] 9.689655 10.00 $y [1] 467. 469.5381 469.8643 468.4865 465.9444 463.0284 460.6479 459.6560 [9] 459.8737 460.2296 459.6313 457.4921 454.0094 449.4482 444.1040 438.3613 [17] 432.6204 427.2892 422.8183 419.6733 418.2646 418.3633 419.3283 420.5202 [25] 421.5768 422.4555 423.1312 423.5419 423.5480 423. Now I want to get what is the value of y at x = 5.25. Can anyone tell me how to find that? thanks in advance - Meet people who discuss and share your passions. Join them now. [[alternative HTML version deleted]] __ 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] Sample selection problem
I want to get a sample of some arbitrary size from a population having only two values 0 and 1 with replacement, but with different probability for selection. For example 0 will be selected with probability 0.4 and 1 with 0.6. I could use sample function i.e. sample(c(0,1), 30, T) to get this, however here, selection of either 0 or 1 has equal probability here. I am looking for a function which can do the same thing but with different probabilities. - Meet people who discuss and share your passions. Join them now. [[alternative HTML version deleted]] __ 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] Expressing number in percentage
I am wondering if there is any procedure to write a particular value in Percentage format, still maintaining it's numeric character. for example I want to write '.33' as '33%' regards, thanks in advance - [[alternative HTML version deleted]] __ 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] Legend
I have following syntax for putting a legend : legend("bottom", fill=c("red","blue"), legend=expression(p==0.30, p==0.50), bty="n") However what I want is that : the value "0.30" should be a value of a variable instead of a constant, so that I can put the name of this variable and in legend it's value will be displayed. Can anyone tell me how to do that? Regards, thanks in advance - Why delete messages? Unlimited storage is just a click away. [[alternative HTML version deleted]] __ 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.