[R] PS to Taking Integral and Optimization using Integrate() and Optim()

2011-06-08 Thread MARYAM ZOLGHADR
Hello again. Thank you for the comments. I have written these codes. iy=function(x) { res=NULL ress=0 for (i in (1:2)) { for (xx in x[i]) { fy=function(y) (exp(-exp(y+log(xx)))*(-exp(y+log(xx)))^2)/(1-exp(-exp(y+log(xx res=c(res,integrate(fy,-6.907,-1.246)$value) ress=ress+res } }

[R] PS

2010-11-18 Thread Terry Therneau
Note that there is NOT an intercept term in my pspline basis. One of the features of psplines is that \sum beta_i f_i(x) (where f_i are the spline basis functions) is linear if and only if the coefficients beta are a linear sequence. This makes it easy to decompose the fit into linear and

[R] ps-output and LaTeX/DVIPS/PS2PDF - Greek letters disappear

2010-06-04 Thread Steffen Uhlig
Hello! My graphs are produced using the postscript-option in R (R version 2.10.1 (2009-12-14)). When Greek letters are used on the axis, everything looks fine in the *.ps-file. If included in a LaTeX-file and (on Ubuntu 10.04, fresh install), the Greek letters appear in the DVI- and

Re: [R] ps-output and LaTeX/DVIPS/PS2PDF - Greek letters disappear

2010-06-04 Thread Joris Meys
That's a problem of LateX and Ubuntu, not R : https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/319495 You'll have more luck on an Ubuntu list or forum. Cheers Joris On Fri, Jun 4, 2010 at 11:47 AM, Steffen Uhlig steffen.uh...@htw-saarland.de wrote: Hello! My graphs are produced using

Re: [R] ps or pdf

2008-04-04 Thread Tribo Laboy
The graphics devices are very similar (they share a lot of code). One small difference is that PostScript has an arc primitive, and PDF does not. Sorry for interjecting, but I have a burning question. It is a bit off topic, so I apologize in advance. What is the stance of the R

Re: [R] ps or pdf

2008-04-01 Thread Joerg van den Hoff
have not followed the thread completely, but: have you tried `bitmap' with `type = pdfwrite' (or psgrb) for comparison? at least with `pdf' there are some issues which can be avoided by using ghostscript via `bitmap'. joerg On Mon, Mar 31, 2008 at 04:17:50PM -0400, Francois Pepin wrote: Prof

[R] ps or pdf

2008-03-31 Thread Francois Pepin
Hi everyone, I have been making a fair amount of figures in R recently that I've been touching up with Illustrator and I've found a difference between pdf and ps files and I was wondering if someone could enlighten me about them. While the figures look the same, the ps version tends to have

Re: [R] ps or pdf

2008-03-31 Thread Prof Brian Ripley
On Mon, 31 Mar 2008, Francois Pepin wrote: Hi everyone, I have been making a fair amount of figures in R recently that I've been touching up with Illustrator and I've found a difference between pdf and ps files and I was wondering if someone could enlighten me about them. While the

Re: [R] ps or pdf

2008-03-31 Thread Francois Pepin
Prof Brian Ripley wrote: Please see the footer of this message. Sorry, here is an example. For some reason, I cannot reproduce it without using actual gene names. set.seed(1) ##The row names were originally obtained using the hgug4112a library ##from bioconductor. I set it manually for

Re: [R] [PS] vlookup in R

2008-03-24 Thread Ben Fairbank
Another way: If x is a two column matrix, as suggested by Henrique D., IDValue 1 7 0.000656733 2 6 0.201764789 3 1 0.671113391 4 10 -0.739727826 5 9 -1.111310154 6 5 -0.859455833 7 2 -1.408229877 8 8 0.993126295 9 3 -0.171906808 10 4 -0.140107677 And you are

Re: [R] [PS] Re: vlookup in R

2008-03-24 Thread Ben Fairbank
Quite right, there is an optional 4th argument, and the table must be sorted ascending on the first column in Excel. Thus these functions only approximately duplicate the Excel functions (improve on them IMHO). BTW, I pasted the wrong formula in my reply; though it works, simpler is ID - 4

Re: [R] [PS] rmultinomial() function

2008-03-19 Thread Ben Fairbank
Mary -- The dmultinomial function (try ?Multinomial, noting that it is an upper case M) has a log option, which, if set to TRUE, returns logarithms of probabilities, but that is for computing probabilities, not generating samples. Perhaps the long you referred to is a misprint for log? In any

Re: [R] [PS] rmultinomial() function

2008-03-19 Thread Mary Black
Thanks Ben and Eric. I've already tried rmultinom(), and there is a rmultinomial() function as well (which is in the multinomRob package). The rmultinomial() is supposed to be a random number generator for the multinomial distribution. There is an argument long which if set to TRUE or FALSE,

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread David Mackovjak
Ben, I would like to test the sulfur on the clover field, nitrogen on the clover field and then test for the presence of interaction. Sorry about the last email, seems it really screwed itself over, here it is again, hopefully nicer: Nitrogen(0) Nitrogen(20)

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread David Mackovjak
5.98 6.26 5.91 6.37 So how would I go about this then? - Original Message From: Rolf Turner [EMAIL PROTECTED] To: David Mackovjak [EMAIL PROTECTED] Sent: Wednesday, March 19, 2008 4:36:47 PM Subject: Re: [R] [PS] Two Way ANOVA With the given structure of your data

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread Daniel Malter
-help@r-project.org Betreff: Re: [R] [PS] Two Way ANOVA I do have the values for each individual values for each cell. They are as follows: N(0)N(20) 4.48 5.76 4.52 5.64 4.635.78 4.70 7.01 4.65 7.11 4.57 7.02 5.21 5.88 5.23

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread Daniel Malter
- -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von David Mackovjak Gesendet: Wednesday, March 19, 2008 7:55 PM An: Rolf Turner; R-help@r-project.org Betreff: Re: [R] [PS] Two Way ANOVA I do have the values for each individual values

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread Rolf Turner
On 20/03/2008, at 12:54 PM, David Mackovjak wrote: I do have the values for each individual values for each cell. They are as follows: N(0)N(20) 4.48 5.76 4.52 5.64 4.635.78 4.70 7.01 4.65 7.11 4.57 7.02 5.21

Re: [R] [PS] Re: Table of basic descriptive statistics like SPSS

2008-03-18 Thread Frank E Harrell Jr
Ben Fairbank wrote: tiny high-resolution histograms Could you say a bit more on that topic? How achieved? Where latex(describe()) uses LaTeX's picture environment after binning into 101 bins. documented? Similar to Tufte's sparklines? yes, a bit See the link from

Re: [R] [PS] Re: a more elegant way to get percentages? (now R books)

2008-03-13 Thread Ben Fairbank
Monica -- There has been a virtual population explosion of R books in recent years and we all have our favorites. You may wish to pick one oriented toward your specialty, but the absolute minimum lowest common denominator (by which I mean that it has the ground zero essential information that

Re: [R] [PS] How to manipulate data according to groups ?

2008-03-13 Thread Ben Fairbank
Look at ?tapply, based on your description, it is what you want. Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ng Stanley Sent: Thursday, March 13, 2008 9:25 AM To: r-help Subject: [PS] [R] How to manipulate data according to groups ? Hi, I have

Re: [R] [PS] Re: a more elegant way to get percentages? (now R books)

2008-03-13 Thread hadley wickham
There has been a virtual population explosion of R books in recent years and we all have our favorites. You may wish to pick one oriented toward your specialty, but the absolute minimum lowest common denominator (by which I mean that it has the ground zero essential information that all

Re: [R] [PS] Generating a new matrix using rbinom and a matrix of probabilities.

2008-03-11 Thread Ben Fairbank
I tried your code and could not get it to run on my installation of R, so I may be missing something. But if you have a matrix of probabilities (call it probs) and want to simulate random binomial draws, can you not simply create a matrix of the same size of uniform random numbers (runif()) (call

Re: [R] [PS] discrete variable

2008-03-02 Thread Ben Fairbank
Try table(), with the name of your vector inside the parentheses. Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pete Dorothy Sent: Sunday, March 02, 2008 2:27 PM To: r-help@r-project.org Subject: [PS] [R] discrete variable Hello, I am sorry for

Re: [R] [PS] Column sums from a data frame (without the headers)

2008-02-29 Thread Ben Fairbank
as.vector(col.Sums()) Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Horn Sent: Friday, February 29, 2008 11:03 AM To: [EMAIL PROTECTED] Subject: [PS] [R] Column sums from a data frame (without the headers) Does anyone know how to get a

Re: [R] [PS] Different results in calculating SD of 2 numbers

2008-01-16 Thread Ben Fairbank
And another problem, in addition to the points made by others, is that the formula for the SD gives a biased estimate (it underestimates it) of the population SD for small n when sampling from a normal distribution. When n is about twelve or so or more, the bias can usually be ignored (it is about

[R] PS graphs in R 2.6.0

2007-10-11 Thread Jorge Ivan Velez Valbuena
Dear R-users: I have been working in R for few years and never I'd been the problems like this. I'm running the last R version and when I try to save a graph in PS format I have the next error Error: Invalid font type In addition: Warning messages: 1: font family not found in PostScript font