[R] reliability of R-Forge?

2010-08-25 Thread David Kane
How reliable is R-Forge? http://r-forge.r-project.org/ It is down now (for me). Reporting "R-Forge Could Not Connect to Database: " I have just started to use it for a project. It has been down for several hours (at least) on different occasions over the last couple of days. Is that common? Will

[R] Specify non-default libiconv, readline, libpng, tiff etc during R compilation

2010-08-25 Thread Derrick LIN
Hi guys, I am trying to compile 64-bit R 2.11.1 on Solaris 10. I mainly follow the guide in here https://www.initworks.com/wiki/pages/viewpage.action?pageId=6521038 The guide suggests that install the customised libiconv, readline under the designated R installation folder and become the private

Re: [R] Looking for an image (R 64-bit on Linux 64-bit) on Amazon EC2

2010-08-25 Thread noclue_
>> You have a 64 bit Linux? If so... >>Dowload the sources Do you mean download Linux kernel source code and then compile it on Amazon EC2? -- View this message in context: http://r.789695.n4.nabble.com/Looking-for-an-image-R-64-bit-on-Linux-64-bit-on-Amazon-EC2-tp2338938p2339072.html Se

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Adrian Ng
Hi Ravi, Using days and dividing it by 365 effectively converts the number to years anyway and allows for the irregular times to be specific to the days. Also, when I replace dates[1] in your line: times <- as.numeric(difftime(dates, dates[1], units="days") / 365.24) with "2010-08-24" I think I

Re: [R] creation package

2010-08-25 Thread anderson nuel
Dear r-help, I took your advice into consideration and i tried to solve my errors. But , when I use the command R CMD check namepackage, I find an error in this file C:/Rpack/namepackage.Rcheck/00check.txt : * using log directory 'C:/Rpack/namepackge.Rcheck' * using R version 2.10.1 (2009-12-14)

Re: [R] list of closures

2010-08-25 Thread Philippe Grosjean
Unless for learning R, you should really consider R.oo or proto packages that may be more convenient for you (but you don't provide enough context to tell). Best, Philippe On 26/08/10 06:28, Gabor Grothendieck wrote: On Thu, Aug 26, 2010 at 12:04 AM, Stephen T. wrote: Hi, I wanted to creat

Re: [R] list of closures

2010-08-25 Thread Gabor Grothendieck
On Thu, Aug 26, 2010 at 12:04 AM, Stephen T. wrote: > > Hi, I wanted to create a list of closures. When I use Map(), mapply(), > lapply(), etc., to create this list, it appears that the wrong arguments are > being passed to the main function. For example: > Main function: >> adder <- function(x)

[R] list of closures

2010-08-25 Thread Stephen T.
Hi, I wanted to create a list of closures. When I use Map(), mapply(), lapply(), etc., to create this list, it appears that the wrong arguments are being passed to the main function. For example: Main function: > adder <- function(x) function(y) x + y Creating list of closures with Map(): > plus

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
I have written a general root-finder using the secant method. secant <- function(par, fn, tol=1.e-07, itmax = 100, trace=TRUE, ...) { # par = a starting vector with 2 starting values # fn = a function whose first argument is the variable of interest # if (length(par) != 2) stop("You must specif

Re: [R] How to obtain the graph of fitted values against one variable after estimation?

2010-08-25 Thread David Winsemius
On Aug 25, 2010, at 10:46 PM, Le Wang wrote: Hi there, I have a question regarding the "plot" command after estimation. Specifically, I estimate a model, say regressing y on x and z. And after estimation, I would like to plot the fitted values against x, but I don't need that for z. The follo

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
You should use cfDate[1] as the time origin. You cannot use 08-24-2010 as the time origin, since that will yield negative times. Here is the correct solution. ANXIRR <- function (cashFlow, dates, guess, tol=1.e-04){ npv <- function (cashFlow, times, irr) { n <- length(cashFlow) sum(cashFlo

[R] How to obtain the graph of fitted values against one variable after estimation?

2010-08-25 Thread Le Wang
Hi there, I have a question regarding the "plot" command after estimation. Specifically, I estimate a model, say regressing y on x and z. And after estimation, I would like to plot the fitted values against x, but I don't need that for z. The following command always gives two graphs, for both va

Re: [R] Rotate x-axis label on log scale

2010-08-25 Thread Tim Elwell-Sutton
Hi Jim Thanks so much for this. The updated staxlab function works perfectly! Tim -Original Message- From: Jim Lemon [mailto:j...@bitwrit.com.au] Sent: Wednesday, August 25, 2010 6:36 PM To: tesutton Cc: r-help@r-project.org Subject: Re: [R] Rotate x-axis label on log scale On 08/25/201

Re: [R] Adding column to dataframe

2010-08-25 Thread nzcoops
To update on this. I ran the same command on a grid of computers with 32gb ram, and it completed in 15 seconds, compared to the ~20 minutes on my desktop. Simply a ram issue as suspected by a few on the list here. Thanks -- View this message in context: http://r.789695.n4.nabble.com/Adding-col

Re: [R] lattice help required

2010-08-25 Thread Felix Andrews
Deepayan Sarkar has a function combineLimits() in the development version of the latticeExtra package (i.e. the version on r-forge.r-project.org) which will set common scales in each row or column of your layout. It can also remove the internal axes. # Felix On 26 August 2010 04:43, Kay Cichini

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
The secant method converges just fine. Your problem might have occurred due to improper conversion of dates to elapsed time. You want to calculate IRR using "year" as the time unit, not "days". Here is the secant function (modified to account for irregular times) and the results for your examp

Re: [R] how to plot y-axis on the right of x-axis

2010-08-25 Thread elaine kuo
Yes, I appreciated your answers which well hit my questions. (esp the perfect model parts). About the plot part, one more question. Is it possible to make the two plots (northern and southern richness) sharing the same Y axis (latitude = 0, the equator) ? In other words, southern richness would be

Re: [R] how to plot y-axis on the right of x-axis

2010-08-25 Thread elaine kuo
Thank you. The answers provides the right direction and a code was written accordingly. One more request, if the label of axis X wants to be drawn from 5 to 1 (left to right) rather than 1 to 5, is it fine to change axis (4, at = NULL) ? If so, which value should be input ? Thanks again. Elaine

Re: [R] OT: R for iPhone/iPad OS?

2010-08-25 Thread Carl Witthoft
Hey, Many thanks to all who responded! I'll pass along the links to my pals. Personally I can't imagine doing R on a virtual keyboard in the first place, but to each his own. Carl __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

Re: [R] Looking for an image (R 64-bit on Linux 64-bit) on Amazon EC2

2010-08-25 Thread stephen sefick
You have a 64 bit Linux? If so... Dowload the sources make sure you have all of the dependencies unpack tarball cd to de-compressed directory issue ./configure make sudo make install or maybe use your distros packages managment tool. Am I missing something? On Wed, Aug 25, 2010 at 4:39

Re: [R] OT: R for iPhone/iPad OS?

2010-08-25 Thread Brian Diggs
On 8/25/2010 2:23 PM, Carl Witthoft wrote: No, seriously: I've had more than one person at work wonder what math toolset could be loaded onto iOS. So, before Matlab, FreeMat, Mathematia, SciLab, Octave, or numpy (:-) ) produces a version for iPad, any chance someone is working on R for iPad? T

[R] Looking for an image (R 64-bit on Linux 64-bit) on Amazon EC2

2010-08-25 Thread noclue_
I have found an existing image on Amazon EC2 including R. But unfortunately, it is 32-bit R on 32-bit Linux. Does anybody know if there exists an mage (R 64-bit on Linux 64-bit) on Amazon EC2? Or how can I install 64-bit R on my own Linux instance there? Thanks. -- View this message in conte

Re: [R] OT: R for iPhone/iPad OS?

2010-08-25 Thread Marc Schwartz
On Aug 25, 2010, at 4:23 PM, Carl Witthoft wrote: > No, seriously: I've had more than one person at work wonder what math > toolset could be loaded onto iOS. So, before Matlab, FreeMat, Mathematia, > SciLab, Octave, or numpy (:-) ) produces a version for iPad, any chance > someone is working

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
Yes, the secant method (like Newton Raphson) is not guaranteed to converge, unlike the bisection method, but it has a superlinear convergence (not that this matters much!). Brent's method, which is used in `uniroot', is a reliable and fast method, which is why I suggested it in my previous email.

Re: [R] OT: R for iPhone/iPad OS?

2010-08-25 Thread Steve Lianoglou
Hi, On Wed, Aug 25, 2010 at 5:37 PM, Greg Snow wrote: > I believe that the iPad conditions for producing apps are incompatible with > the GPL (gnuGo was removed from the apps store recently for this reason), so > don't hold your breath. > > There may be some possibility for an app on the iPad t

Re: [R] OT: R for iPhone/iPad OS?

2010-08-25 Thread Erik Iverson
Instructions for installing R on jailbroken devices: http://rwiki.sciviews.org/doku.php?id=getting-started:installation:iphone Carl Witthoft wrote: No, seriously: I've had more than one person at work wonder what math toolset could be loaded onto iOS. So, before Matlab, FreeMat, Mathematia

Re: [R] OT: R for iPhone/iPad OS?

2010-08-25 Thread Greg Snow
I believe that the iPad conditions for producing apps are incompatible with the GPL (gnuGo was removed from the apps store recently for this reason), so don't hold your breath. There may be some possibility for an app on the iPad that would access R on a server somewhere else, but that is beyon

[R] OT: R for iPhone/iPad OS?

2010-08-25 Thread Carl Witthoft
No, seriously: I've had more than one person at work wonder what math toolset could be loaded onto iOS. So, before Matlab, FreeMat, Mathematia, SciLab, Octave, or numpy (:-) ) produces a version for iPad, any chance someone is working on R for iPad? _

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
Another approach is to use `uniroot' to find the zero of the NPV function: npv <- function (cashFlow, irr) { n <- length(cashFlow) sum(cashFlow / (1 + irr)^{0: (n-1)}) } uniroot(f=npv, interval=c(0,1), cashFlow=cashFlow) However, there may be situations where there are no

Re: [R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Ravi Varadhan
Hi Adrian, Your code for the secant method is correct. I just tweaked it a bit w/o the calendar time feature (assuming that the cash flows will be available on an annual basis) as follows: ANXIRR <- function (cashFlow, guess, tol=1.e-04){ npv <- function (cashFlow, irr) { n <- length(ca

Re: [R] package MuMIn

2010-08-25 Thread Ben Bolker
[cc'ing back to r-help: this is good etiquette so that the responses will be seen by others/ archived for future reference.] On 10-08-25 04:35 PM, Marino Taussig De Bodonia, Agnese wrote: > Yes, I meant "MuMIn" > > the global formula I introduced was: > > rc4.mod<-lm(central$hunting~ central$yea

Re: [R] Removing inter-bar spaces in barchart

2010-08-25 Thread David Winsemius
On Aug 24, 2010, at 10:20 PM, Jonathan Greenberg wrote: Rhelpers: I'm trying to make a barchart of a 2-group dataset (barchart(x~y,data=data,groups=z,horizontal=FALSE)). My problem is that I can't, for the life of me, seem to get rid of the inter-bar space -- box.ratio set to 1 doesn't do

[R] accessing the attr(*,label.table) after importing from spss

2010-08-25 Thread moleps
Dear all, I just received a file from a colleague in spss. The read.spss could not finish the file due to an error (Unrecognized record type 7, subtype 18 encountered in system file) so instead I converted the file using stat-transfer. Looking at my data I see that most labels are in the attribu

Re: [R] Draw a perpendicular line?

2010-08-25 Thread CZ
Thank you all for your suggestions and especially the codes. Now I am able to solve it by finding the intercepts and slopes for both lines first, and then I can find the coordinates of x and y at the intersection. At first I forgot how to use C to get the intercept of line CD... Thanks again.

Re: [R] Removing inter-bar spaces in barchart

2010-08-25 Thread Dennis Murphy
Hi: On Wed, Aug 25, 2010 at 11:28 AM, Greg Snow wrote: > Using the barplot function in base graphics you just set space=0, but that > function does not have a box.ratio argument which would imply that you are > using something else. If you let us know which function (and which package > it is i

Re: [R] how do R calculates the number of intervals between tick-marks

2010-08-25 Thread Antonio Olinto
Hi, With axTicks I did what I wanted. Thank you all for the attention. Below is the code I did to have a plot with three y axes. Suggestions to improve the routine are welcome. All the best, Antonio Olinto Data in a spreadsheet YEARL NFB NFT 200526,352158 150025,

Re: [R] What does this warning message (from optim function) mean?

2010-08-25 Thread Cheng Peng
the deteminant is a nonpositive value. log(det(...)) produce NaNs... -- View this message in context: http://r.789695.n4.nabble.com/What-does-this-warning-message-from-optim-function-mean-tp2338689p2338719.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Checking a point behind two polygons

2010-08-25 Thread CZ
Hi, I am working on a problem of checking whether a point is behind two convex hulls. By 'behind', I mean a point which is outside of two convex hulls can't reach either of these two hulls without reaching the other. My idea is to find the segments between the point and the vertices of a hull

Re: [R] What does this warning message (from optim function) mean?

2010-08-25 Thread Ravi Varadhan
Hi, You did not give us any information about your likelihood function, f, nor did you provide a reproducible example. So, I cannot tell for sure whether the parameter estimates are reliable. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.or

Re: [R] Draw a perpendicular line?

2010-08-25 Thread Dennis Murphy
Hi: The function below plots the line segment between two points A and B as well as the normal from C to AB, with a dot as the intersection point (D), which is returned with the function call. The aspect ratio is kept at one so that the orthogonality between the two lines is not distorted by the a

Re: [R] Change value of a slot of an S4 object within a method.

2010-08-25 Thread Steve Lianoglou
Howdy, On Wed, Aug 25, 2010 at 1:21 PM, Joris Meys wrote: > Hi Steve, > > thanks for the tip.  I'll definitely take a closer look at your > solution for implementation for future use.  But right now I don't > have the time to start rewriting my class definitions. > > Luckily, I found where exactl

Re: [R] package MuMI

2010-08-25 Thread Ben Bolker
Marino Taussig De Bodonia, Agnese imperial.ac.uk> writes: > I am using the package "MuMI" to run all the possible combinations > of variables in my full model, and select > my best models. When I enter my variables in the original model I > write them like this > > lm(y~ a +b +c +a:b) > > How

Re: [R] several odfWeave questions

2010-08-25 Thread Max Kuhn
Ben, >  1a. am I right in believing that odfWeave does not respect the > 'keep.source' option?  Am I missing something obvious? I believe it does, since this gets passed directly to Sweave. >  1b. is there a way to set global options analogous to \SweaveOpts{} > directives in Sweave? (I looked a

Re: [R] GLM outputs in condensed versus expanded table

2010-08-25 Thread Peter Dalgaard
On 08/25/2010 05:17 PM, francogrex wrote: > > Hi I'm having different outputs from GLM when using a "condensed" table > V1V2 V3 Present Absent > 0 0 0 3 12 > 0 0 1 0 0 > 0 1 0 0 0 > 0 1 1 1 0 > 1

Re: [R] lattice help required

2010-08-25 Thread Kay Cichini
.. thanks again, richard. and you swiftly saw the next problem comming up - when using par.settings = list(layout.widths = list(axis.panel = c(1, 0))) getting rid of the double tick labeling would be natural - but i'll leave it at that for today. many thanks, kay Richard M. Heiberger wrote: >

Re: [R] approxfun-problems (yleft and yright ignored)

2010-08-25 Thread Greg Snow
The plots did not come through, see the posting guide for which attachments are allowed. It will be easier for us to help if you can send reproducible code (we can copy and paste to run, then examine, edit, etc.). Try finding a subset of your data for which the problem still occurs, then send

Re: [R] What does this warning message (from optim function) mean?

2010-08-25 Thread Prof Brian Ripley
You mean 'TRUE': 'T' is a variable in R, with initial value TRUE. On Wed, 25 Aug 2010, Sally Luo wrote: Hi R users, I am trying to use the optim function to maximize a likelihood funciton, and I got the following warning messages. Could anyone explain to me what messege 31 means exactly? Is it

Re: [R] Removing inter-bar spaces in barchart

2010-08-25 Thread Greg Snow
Using the barplot function in base graphics you just set space=0, but that function does not have a box.ratio argument which would imply that you are using something else. If you let us know which function (and which package it is in) then it is easier (possible) for us to help you, even better

Re: [R] output values from within a function

2010-08-25 Thread Greg Snow
Put the line: cat(z1,'\n') in your function. You may also want to put the flush.console() command right after that. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help

Re: [R] SEM : Warning : Could not compute QR decomposition of Hessian

2010-08-25 Thread John Fox
Dear Anne, I started to diagram your model but stopped when I noticed some problems: (1) Some variables, such as pays_alti, are clearly endogenous, since they have arrows pointing to them, yet are declared as fixed exogenous variables; that clearly doesn't make sense. (2) You've placed conflicting

[R] [R-pkgs] stringr: version 0.4

2010-08-25 Thread Hadley Wickham
Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparations tasks. R provides a solid set of string operations, but because they have grown organically over time, they can be inconsistent and a little hard to learn. Additionally, they

[R] multivariate analysis of variance

2010-08-25 Thread celal arslan
Hi, can anyone tell me how i may find out the between-group variance and within-group variance for multivariate case? I have 6 Groups and 73 Variables. (with MANOVA ? wie) dim(data) [1] 2034   76 Thanks Celal __ R-help@r-project.org mailing l

Re: [R] Problem with clusterCall, "Error in checkForRemoteErrors(lapply(cl, recvResult)) : "

2010-08-25 Thread telm8
Oh, I forgot to say, ui.Next() is a function I defined to sample from the proposal distribution given the current state. -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-clusterCall-Error-in-checkForRemoteErrors-lapply-cl-recvResult-tp2338375p2338378.html Sent from the

[R] pairwise correlation of many samples

2010-08-25 Thread Moon Eunyoung
Dear list, I have a csv file like below, and I have similar 150 files (responses from 150 samples) in a folder. I’d like to get the mean score of pairwise correlation score among 150 respondents by hour(0~20hour). All I can think of is bring up two files and get the pairwise correlation score

[R] What does this warning message (from optim function) mean?

2010-08-25 Thread Sally Luo
Hi R users, I am trying to use the optim function to maximize a likelihood funciton, and I got the following warning messages. Could anyone explain to me what messege 31 means exactly? Is it a cause for concern? Since the value of convergence turns out to be zero, it means that the converging is s

[R] Problem with clusterCall, "Error in checkForRemoteErrors(lapply(cl, recvResult)) : "

2010-08-25 Thread telm8
Hi all, I am trying to use snow package to do a parallel MCMC. I have read a few guides and articles, the following is that I came up with. When I run it I got the error message: Error in checkForRemoteErrors(lapply(cl, recvResult)) : 4 nodes produced errors; first error: could not find funct

Re: [R] How to remove all objects except a few specified objects?

2010-08-25 Thread Cheng Peng
Thanks to De-Jian and Peter. Peter's way is neat and cool! -- View this message in context: http://r.789695.n4.nabble.com/How-to-remove-all-objects-except-a-few-specified-objects-tp2335651p2338221.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] how to plot y-axis on the right of x-axis

2010-08-25 Thread Antonio Olinto
Dear Elaine I'm developing a code to make a 3 y-axes plot. It may can help you. Also your question leads to mine, posted yesterday: How does R calculate the interval between tick-marks. Below follows the code I'm developing. Data: ANO CKG NUP NDE 200526352158

[R] NewJerseyR Meeting

2010-08-25 Thread Sarah Lewis
Mango Solutions are proud to announce the first NewJerseyR Meeting to be held on the 16th September 2010. Please see details below: NewJerseyR Date: Tuesday 16th September Time: 6.30pm - 9.30pm Venue: Renaissance Woodbridge Hotel - Iselin, New Jersey The agenda has yet to

[R] GLM outputs in condensed versus expanded table

2010-08-25 Thread francogrex
Hi I'm having different outputs from GLM when using a "condensed" table V1 V2 V3 Present Absent 0 0 0 3 12 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 7 20 1 0

Re: [R] Plot bar lines like excel

2010-08-25 Thread abotaha
Great .. thanks for the to much help and i too appreciate hel p and explanation Cheers -- View this message in context: http://r.789695.n4.nabble.com/Plot-bar-lines-like-excel-tp2337089p2338158.html Sent from the R help mailing list archive at Nabble.com. _

[R] Showing a line function on the ploat area

2010-08-25 Thread Neta
I have a collection of results. I use R to get the linearization presented. how can I get R to show the equation and R^2 value on the plot area next to the graph? -- View this message in context: http://r.789695.n4.nabble.com/Showing-a-line-function-on-the-ploat-area-tp2338389p2338389.html Sent

Re: [R] Merging two data set in R,

2010-08-25 Thread Danne Mora
try the following "merge" command. merge(A,B, by = intersect(names(A), names(B)), all.x=FALSE, all.y=FALSE) or merge(A,B, by = "ID", all.x=FALSE, all.y=FALSE) Dannemora On Wed, Aug 25, 2010 at 5:35 AM, Mangalani Peter Makananisa < pmakanan...@sars.gov.za> wrote: > Dear R Gurus, > > > > I am cur

[R] Secant Method Convergence (Method to replicate Excel XIRR/IRR)

2010-08-25 Thread Adrian Ng
Hi, I am new to R, and as a first exercise, I decided to try to implement an XIRR function using the secant method. I did a quick search and saw another posting that used the Bisection method but wanted to see if it was possible using the secant method. I would input a Cash Flow and Date vect

Re: [R] lattice help required

2010-08-25 Thread RICHARD M. HEIBERGER
The multiple y axes are protecting you in this situation. z <- cbind(rnorm(100,c(1,10),1), rnorm(100,c(20,30),1)) dotplot(z[,1]+z[,2] ~ facs$Treatment|facs$Sites, outer=TRUE, scales = list( y = list( relation="free")), ylab=c("y1", "y2"), xlab

Re: [R] lattice help required

2010-08-25 Thread Kay Cichini
... i added relation="free" to account for diffferent ranges of y1 and y2: dotplot(y1+y2 ~ facs$Treatment|facs$Sites, outer=TRUE, scales = list(y = list(relation="free"), x = list(rot = 90, tck=c(1,0))), ylab=c("y1", "y2"), xlab=c("Site 1", "Site 2"),

[R] nls self starting function

2010-08-25 Thread Marlin Keith Cox
I need the simple function for the following set of data. This is a toy version of my data, but the error is persistent in both. To compare with excel, I would just 1) format trendline, 2) display equation and R-squared on chart. I obviously tried to use a nls and wanted to use the self startup

Re: [R] How to obtain seed after generating random number?

2010-08-25 Thread Greg Snow
If you find yourself doing things like this often, but don't want to explicitly set the seed, or save seeds before simulating, then you can run the following code (or put it into .Rprofile or similar): .Last.Random.seed <- .Random.seed addTaskCallback( function(expr, val, ok, visible){

Re: [R] Change value of a slot of an S4 object within a method.

2010-08-25 Thread Joris Meys
Hi Steve, thanks for the tip. I'll definitely take a closer look at your solution for implementation for future use. But right now I don't have the time to start rewriting my class definitions. Luckily, I found where exactly things were going wrong. After reading into the documentation about th

Re: [R] frequency, count rows, data for heat map

2010-08-25 Thread Dennis Murphy
Hi: Here are a couple of ways to render a basic 2D table. Let's call your input data frame dat: > names(dat) <- c('samp', 'sequen') > ssTab <- as.data.frame(with(dat, table(samp, sequen))) > ssTab # data frame version samp sequen Freq 1 111abc1 2 1079abc1 3 5576abc1 4

[R] several odfWeave questions

2010-08-25 Thread Ben Bolker
[Sending both to the maintainer and to R-help, in case anyone else has answers ...] I've looked in odfWeave documentation, vignette, and poked around on the web some, and haven't found answers yet. 1a. am I right in believing that odfWeave does not respect the 'keep.source' option? Am I mis

Re: [R] Repeat the first day data through all the day. Zoo

2010-08-25 Thread Gabor Grothendieck
On Wed, Aug 25, 2010 at 11:18 AM, skan wrote: > > # duplicated / na.locf   doesn't work > it says Error in fix.by(by.x, x) : 'by' must specify valid column(s) > > if I use ifelse instead of ifelse.zoo it works but it gives me a non zoo > vector. > Myabe is because my zoo version is older. > They

Re: [R] lattice help required

2010-08-25 Thread Kay Cecil Cichini
exactly - thanks a lot, richard! kay Zitat von "RICHARD M. HEIBERGER" : Kay, doe this do what you want? dotplot(y1+y2 ~ facs$Treatment|facs$Sites, outer=TRUE, scales = list(x = list(rot = 90, tck=c(1,0))), ylab=c("y1", "y2"), xlab=c("Site 1", "Site 2"),

[R] package MuMI

2010-08-25 Thread Marino Taussig De Bodonia, Agnese
Hello, I am using the package "MuMI" to run all the possible combinations of variables in my full model, and select my best models. When I enter my variables in the original model I write them like this lm(y~ a +b +c +a:b) However, "MuMI" will also use the variable b:a, which I do not want in

Re: [R] Odp: Finding pairs

2010-08-25 Thread Dennis Murphy
Hi: I'm just ideating here (think IBM commercial...) but perhaps a graphical model approach might be worth looking into. It seems to me that Mr. Rhodes is looking for clusters of banks that are under the same ownership umbrella. That information is not directly available in a single variable, but

Re: [R] Change value of a slot of an S4 object within a method.

2010-08-25 Thread Steve Lianoglou
Hi Joris, On Wed, Aug 25, 2010 at 11:56 AM, Joris Meys wrote: > Dear all, > > I have an S4 class with a slot "extra" which is a list. I want to be > able to add an element called "name" to that list, containing the > object "value" (which can be a vector, a dataframe or another S4 > object) > > O

Re: [R] Compiling Fortran for R : .so: mach-o, but wrong architecture

2010-08-25 Thread holstius
Hi Marie, this link may be helpful if you want to build it for both architectures, 32-bit and 64-bit. I struggled with the same problem not too long ago. http://cran.rakanu.com/bin/macosx/RMacOSX-FAQ.html#Building-universal-package I ended up writing a very simple Makefile to accompany [my

Re: [R] multiple x factors using the sciplot package

2010-08-25 Thread Dennis Murphy
Hi: You can probably do what you want in either ggplot2 or lattice, but I would recommend at least a couple different approaches: (1) Plot individual bar charts by combinations of year and period. This is easy to do in both ggplot2 and lattice: in ggplot2, one would use geom_bar(x) +

[R] Change value of a slot of an S4 object within a method.

2010-08-25 Thread Joris Meys
Dear all, I have an S4 class with a slot "extra" which is a list. I want to be able to add an element called "name" to that list, containing the object "value" (which can be a vector, a dataframe or another S4 object) Obviously setMethod("add.extra",signature=c("PM10Data","character","vector"),

Re: [R] Draw a perpendicular line?

2010-08-25 Thread William Revelle
At 3:04 PM -0700 8/23/10, CZ wrote: Hi, I am trying to draw a perpendicular line from a point to two points. Mathematically I know how to do it, but to program it, I encounter some problem and hope can get help. Thanks. I have points, A, B and C. I calculate the slope and intercept for line d

Re: [R] lattice help required

2010-08-25 Thread RICHARD M. HEIBERGER
Kay, doe this do what you want? dotplot(y1+y2 ~ facs$Treatment|facs$Sites, outer=TRUE, scales = list(x = list(rot = 90, tck=c(1,0))), ylab=c("y1", "y2"), xlab=c("Site 1", "Site 2"), strip=FALSE) On Wed, Aug 25, 2010 at 11:04 AM, Kay Cichini wrote: > > h

Re: [R] Repeat the first day data through all the day. Zoo

2010-08-25 Thread skan
# duplicated / na.locf doesn't work it says Error in fix.by(by.x, x) : 'by' must specify valid column(s) if I use ifelse instead of ifelse.zoo it works but it gives me a non zoo vector. Myabe is because my zoo version is older. cheers -- View this message in context: http://r.789695.n4.nabbl

Re: [R] Estimate average standard deviation of mean of two dependent groups

2010-08-25 Thread Joshua Wiley
Hi Jokel, If I remember correctly 1) The variance of the sum of two variables X and Y is: var(X) + var(Y) + (2 * cov(X, Y)) If you create some sample data, you can verify this by: var((X + Y)) 2) The variance of a random variable (X) multiplied by some constant (K) is equal to the

Re: [R] frequency, count rows, data for heat map

2010-08-25 Thread Jan van der Laan
Your problem is not completely clear to me, but perhaps something like data <- data.frame( a = rep(c(1,2), each=10), b = rep(c('a', 'b', 'c', 'd'), 5)) library(plyr) daply(data, a ~ b, nrow) does what you need. Regards, Jan On Wed, Aug 25, 2010 at 4:53 PM, rtsweeney wrote: > > Hi all, >

Re: [R] lmer() causes segfault

2010-08-25 Thread Bertolt Meyer
Dennis, just wow. Thank you so much. I knew it was something trivial - in this case the variable type of the of the grouping variables. However, something as trivial as this should not throw a segfault IMHO. I tried subscribing to R-sig-mixed this morning, but the corresponding mail serve

[R] lattice help required

2010-08-25 Thread Kay Cichini
hello, i want to stack two lattice plots beneath each other using one x-axis and sharing the same text-panels, like: # library(lattice) y1 <- rnorm(100,100,10) y2 <- rnorm(100,10,1) facs<-expand.grid(Sites=rep(c("Site I","Site I

[R] frequency, count rows, data for heat map

2010-08-25 Thread rtsweeney
Hi all, I have read posts of heat map creation but I am one step prior -- Here is what I am trying to do and wonder if you have any tips? We are trying to map sequence reads from tumors to viral genomes. Example input file : 111 abc 111 sdf 111 xyz 1079 abc 1079 xyz 1079 xyz 55

[R] SEM : Warning : Could not compute QR decomposition of Hessian

2010-08-25 Thread Anne Mimet
Hi useRs, I'm trying for the first time to use a sem. The model finally runs, but gives a warning saying : "In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars, : Could not compute QR decomposition of Hessian. Optimization probably did not converge. " I found in

Re: [R] Comparing samples with widely different uncertainties

2010-08-25 Thread Marc Schwartz
On Aug 25, 2010, at 8:57 AM, Sandy Small wrote: > Hi > This is probably more of a statistics question than a specific R > question, although I will be using R and need to know how to solve the > problem in R. > > I have several sets of data (ejection fraction measurements) taken in > various ways

Re: [R] Comparing samples with widely different uncertainties

2010-08-25 Thread peter dalgaard
On Aug 25, 2010, at 3:57 PM, Sandy Small wrote: > Hi > This is probably more of a statistics question than a specific R > question, although I will be using R and need to know how to solve the > problem in R. > > I have several sets of data (ejection fraction measurements) taken in > various way

[R] approxfun-problems (yleft and yright ignored)

2010-08-25 Thread Samuel Wuest
Dear all, I have run into a problem when running some code implemented in the Bioconductor panp-package (applied to my own expression data), whereby gene expression values of known true negative probesets (x) are interpolated onto present/absent p-values (y) between 0 and 1 using the *approxfun -

Re: [R] Odp: Finding pairs

2010-08-25 Thread Petr PIKAL
Hi well, I will add some explanation r-help-boun...@r-project.org napsal dne 25.08.2010 11:24:38: > Dear Mr Petr PIKAL > After reading the R code provided by you, I realized that I would have never > figured out how this could have been done. I am going to re-read again and > again your code

Re: [R] how do R calculates the number of intervals between tick-marks

2010-08-25 Thread Henrique Dallazuanna
Take a look at pretty function. On Tue, Aug 24, 2010 at 8:05 PM, Antonio Olinto wrote: > Hello, > > I want to know how do R calculates the number of intervals between > tick-marks in the y axis in a plot. > > I'm making a three y-axes plot and this information would help me a lot. > > Thanks in a

Re: [R] Repeat the first day data through all the day. Zoo

2010-08-25 Thread Gabor Grothendieck
On Wed, Aug 25, 2010 at 9:48 AM, skan wrote: > > thanks > I'll try them, > > Why do you use the brackets in zz[]  ? So it stays a zoo object with the same index. We are only replacing the data part. __ R-help@r-project.org mailing list https://stat.et

[R] Comparing samples with widely different uncertainties

2010-08-25 Thread Sandy Small
Hi This is probably more of a statistics question than a specific R question, although I will be using R and need to know how to solve the problem in R. I have several sets of data (ejection fraction measurements) taken in various ways from the same set of (~400) patients (so it is paired data).

Re: [R] how do R calculates the number of intervals between tick-marks

2010-08-25 Thread David Winsemius
On Aug 24, 2010, at 7:05 PM, Antonio Olinto wrote: Hello, I want to know how do R calculates the number of intervals between tick-marks in the y axis in a plot. ?axTicks # and then look at the other citations and the code as needed I'm making a three y-axes plot and this information wo

Re: [R] Repeat the first day data through all the day. Zoo

2010-08-25 Thread skan
thanks I'll try them, Why do you use the brackets in zz[] ? -- View this message in context: http://r.789695.n4.nabble.com/Repeat-the-first-day-data-through-all-the-day-Zoo-tp2338069p2338266.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] percentage sign in expression

2010-08-25 Thread David Winsemius
On Aug 25, 2010, at 4:32 AM, e-letter wrote: On 24/08/2010, David Winsemius wrote: On Aug 24, 2010, at 9:37 AM, e-letter wrote: Readers, According to the documentation for the function 'plotmath' there is no apparent possibility to add the percent sign (%) to a plot function, Where d

[R] multiple x factors using the sciplot package

2010-08-25 Thread Jordan Ouellette-Plante
Dear R community, I am a beginner using the sciplot package to graph barplots. I would like to be able to graph two x factors (Sampling.year and Period). Sampling.year: 2006, 2007, 2008, 2009 Period: First, Second, Total The parameter "group" is the different species I looked at. They

Re: [R] multi day R run crashed - is there a log

2010-08-25 Thread Martin Tomko
Hi , thanks, the lower.tri idea is I guess the best way. Will try that. Cheers Martin On 8/25/2010 2:21 PM, Sarah Goslee wrote: Hi, On Wed, Aug 25, 2010 at 8:11 AM, Martin Tomko wrote: Hi Sarah, thank you very much for your answer. I have been spitting things out on screen, but unfortunat

  1   2   >