[R] function design: multiple imput names

2011-07-17 Thread John Lande
dear all, a simple question, I need to write a function in which I retrive an undetermined number of vector in the function. I solved the problem thanks to this link http://stackoverflow.com/questions/2540232/how-to-allow-multiple-inputs-from-user-using-r so my function will look alike this my

[R] C function call in R

2010-05-18 Thread John Lande
dear all, we am trying to improve the performance of my R code, with the implentation of some function with custom C code. we found difficult to import and export/import data structure such us matrices or data.frame into the external C functions. we already tried the solution from "Writing R Exte

[R] R package compilation in windows

2010-04-30 Thread John Lande
dear R user, I al rying to compile an R package with some C code. everithing work fine as long as I work in Linux or MaCOX. unluckyly I can cant compile it under Windows, here is the error, but I cant figure it out what is the problem. can you help me? * using log directory 'C://MyPKG.Rcheck' * u

[R] perl functions in R enviroment

2009-09-20 Thread John Lande
dear all, I am trying to implement some perl scripting in R to improve the performance of some scripts. I found RSPerl library, but it seems to be quite tricky to import variables. this is a simple example. is there any simpler way to do it? furthermore is there any other available resource to in

Re: [R] Kaplan-Meier Plot

2009-01-15 Thread John Lande
thank you, it worked properly. On Thu, Jan 15, 2009 at 4:53 AM, Marc Schwartz wrote: > on 01/14/2009 03:32 PM John Lande wrote: > > dear all, > > > > I want to plot a kaplan Meier plot with the following functions, but I > fail > > to produce the plot I want: >

[R] Kaplan-Meier Plot

2009-01-14 Thread John Lande
dear all, I want to plot a kaplan Meier plot with the following functions, but I fail to produce the plot I want: library(survival) tim <- (1:50)/6 ind <- runif(50) ind[ind > 0.5] <- 1; ind[ind < 0.5] <- 0; MS <- runif(50) pred <- vector() pred[MS < 0.3] <- 0; pred[MS >= 0.3] <- 1 df <- as.data.f

[R] Kaplan-Meier Plot

2009-01-14 Thread John Lande
dear all, I want to plot a kaplan Meier plot with the following functions, but I fail to produce the plot I want: library(survival) tim <- (1:50)/6 ind <- runif(50) ind[ind > 0.5] <- 1; ind[ind < 0.5] <- 0; MS <- runif(50) pred <- vector() pred[MS < 0.3] <- 0; pred[MS >= 0.3] <- 1 df <- as.data.f

Re: [R] pattern matching

2008-10-27 Thread John Lande
On Sun, Oct 26, 2008 at 8:06 PM, Duncan Murdoch <[EMAIL PROTECTED]>wrote: > On 26/10/2008 11:54 AM, John Lande wrote: > >> dear all, >> >> I have a little problem I am doing a loop, witha grep function. sometimes >> it >> happens that have the following

[R] pattern matching

2008-10-26 Thread John Lande
dear all, I have a little problem I am doing a loop, witha grep function. sometimes it happens that have the following results > tmp <- grep("x", y) > tmp integer(0) how can I recognise this outcome? is.na is not working of course, so what else? thank you [[alternative HTML version d

[R] mapping one redundant index to another redundant index

2008-06-28 Thread John Lande
Dear R users, I have a simple problem I cannot solve, but I sure you can help. I have two vector, let say > tmp1 <- c("a", "a", "b", "c") > tmp2 <- c("a", "a", "b", "c", "c", "d") and I want to create a matrix of two column for which I have all the combinations of the same character, let say li

[R] dlda scores

2008-04-30 Thread John Lande
Dear Bioc, I am using the stat.diag.da function from sma package in R-2.7.0 to make class prediction in microarray dataset. I would like to retrive the not only the classification, but also the raw score assigned to each sample in order to be classified both in the training and in the validation

[R] rounding in calculation

2008-03-21 Thread John Lande
dear all, I report a problem very simple, that I does non know how to handle. look at the following code: > a = rep(16.256, 5) > sum(a[1:5]^2) - (sum(a[1:5])^2/5) [1] 2.273737e-13 as you can see i retrieve a non 0 value, when i am expected to. what can I do? > sessionInfo() R version 2.6.2 (20

[R] image quality

2008-02-11 Thread John Lande
dear all, I am writing a sweave documentation for my analysis, and I am plotting huge scatter plot data for microarray. unlucly this take a lot of resource to my pc because of the quality of the image which is to high (I see the PC get stuck for each single spot). how can I overcome this problem? i

[R] multiple functions with three dots

2008-02-01 Thread John Lande
Dear all, I am creating functions with the "three dot" strategy. I wold like to have suggestion when writing multiple functions that calls multiple functions with "...". I will give you a couple of example: >a=1:5 >b=6:10 >d=3:7 >example=function(x,y, z, ...){ plot(x,y, ...) points(x,z, .

[R] plotting gridlines

2008-01-25 Thread John Lande
dear all, I have a very simple question but I could not figure out. I need to make plots with grid in the background. something like I old retrive like this a=runif(100)*10 b=runif(100)*10 plot(a,b, pch=20, xlim=c(0, round(max(a))), ylim=c(0, round(max(b vs=seq(0, max(a), 0.5) for(i in 1:le

[R] access to webpage code

2008-01-13 Thread John Lande
dear R user, I need a function that download the code of web page as html, to further parse it. something like >site="http://www.R-project.com"; >code=function(site) >code !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> The R Project for Statistical Computing The R

[R] Sweave, and long lasting scripts

2007-11-02 Thread John Lande
Dear R user, I am using Sweave to write my reports with R code. Unlucly my code take a lot of time to run, and I don't want to run it multiple time, if possible, as I am still developping the tools. It seems that a sweave run does not save the enviroment at the end of the process, is there a way

Re: [R] print Text on device

2007-10-09 Thread John Lande
Healthcare > [EMAIL PROTECTED] > (801) 408-8111 > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of John Lande > > Sent: Thursday, October 04, 2007 4:42 AM > > To: r-help@r-project.org > > Subjec

Re: [R] print Text on device

2007-10-04 Thread John Lande
ur data looks like and how you > might want it plotted. 'text' does 'put' data on your plot. What > else do you want? > > On 10/4/07, John Lande <[EMAIL PROTECTED]> wrote: > > hi BioC, > > > > > > I need to plot a vector of characters

[R] print Text on device

2007-10-04 Thread John Lande
hi BioC, I need to plot a vector of characters on a pdf device, not as a legend, but as in image by itself. I tried text but it is only related to locate text in a plot. what do you suggest? > sessionInfo() R version 2.6.0 (2007-10-03) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US.UTF-8;L

[R] barplot border width

2007-09-12 Thread John Lande
I need to increase the width of the border in a barplot, i checked both barplot, and barplot2, but cant find how to do it. how can I do? thank you john [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.et