Re: [R] how to allocate more memory?

2013-09-12 Thread David Winsemius
On Sep 11, 2013, at 5:05 PM, Ramona Lall wrote: Hello all, I am running mixed model on a large dataset and I get the following warning messages: Reached total allocation of 1535Mb: see help(memory.size) and Calloc could not allocate memory (705648 of 8 bytes) How do I get around this?

Re: [R] Combining information from two matrices

2013-09-12 Thread Bert Gunter
Your solution is unnecessarily complicated. There is no need to convert to data frames and no need to eval labels -- simple indexing by column and row names will do. I think the following code is pretty self-explanatory: (Starting with the same mat1 and mat2) rnames -

Re: [R] how to allocate more memory?

2013-09-12 Thread Prof Brian Ripley
On 12/09/2013 07:00, David Winsemius wrote: On Sep 11, 2013, at 5:05 PM, Ramona Lall wrote: Hello all, I am running mixed model on a large dataset and I get the following warning messages: Reached total allocation of 1535Mb: see help(memory.size) and Calloc could not allocate memory (705648

[R] how to retain dimnames while exporting from excel into r

2013-09-12 Thread Charles Thuo
v- read.csv(file=sales.csv,header=TRUE) v i get an output whose column names are V1,V2, and so on but i would like to retain the original column names such as january through to december. Charles. [[alternative HTML version deleted]] __

[R] Fwd: how to retain dimnames while exporting from excel into r

2013-09-12 Thread vikram ranga
-- Forwarded message -- From: vikram ranga babuaw...@gmail.com Date: Thu, Sep 12, 2013 at 1:02 PM Subject: Re: [R] how to retain dimnames while exporting from excel into r To: Charles Thuo tcmui...@gmail.com On Thu, Sep 12, 2013 at 12:45 PM, Charles Thuo tcmui...@gmail.com wrote:

[R] substituting string variable in expression with its value

2013-09-12 Thread Jannis
Hi, the following code works: plot(1,1, main=expression(paste(speed [, m * s^{-1}, ]))) I would, however, like to be able to supply the value speed and m*s^{-a} by variables, e.g. do something like: a = 'speed' b = 'm*s^{-2}' plot(1,1, main=expression(paste(a, [, b, ]))) This,

Re: [R] how to retain dimnames while exporting from excel into r

2013-09-12 Thread arun
Hi, Try with: read.csv(file=sales.csv,header=TRUE,check.names=FALSE) A.K. - Original Message - From: Charles Thuo tcmui...@gmail.com To: r-help@r-project.org Cc: Sent: Thursday, September 12, 2013 3:15 AM Subject: [R] how to retain dimnames while exporting from excel into r v-

Re: [R] substituting string variable in expression with its value

2013-09-12 Thread Gerrit Eichner
Hi, Jannis, maybe plot( 1, 1, main = bquote( paste( .(a), [, .(b), ]))) comes close to what you want, but I think you may even have to use the following to get a varying exponent really printed elevated: a - speed b - m * s cc - -2 plot( 1, 1, main = bquote( paste( .(a), [,

Re: [R] Formula in a model

2013-09-12 Thread Paulito Palmes
Hi Gerrit, Thank you very much for the precise explanation.  Syntactically, I thought R is smart enough to detect that I'm using one of the columns because I use data=mytable syntax which means that input/output information are in the mytable.  For a generic support, I think it's wise to

[R] Getting Approximate Estimates after Deleting Factors out from fastbw()

2013-09-12 Thread Petar Milin
Hello! I am using relatively simple linear model. By applying fastbw() on ols() results from rms package I would like to get subtable Approximate Estimates after Deleting Factors. However, it seems this is not possible. Am I right? I can only get coefficients for variables kept in the model

[R] Privacy rights of an old user of this list

2013-09-12 Thread John Gonzalez
Dear subscribers of r-help, I would like to know your opinion about a privacy problem that I recently had after publishing to this list. Not a long time ago, I requested to the administrators of this list that they removed 2 or 3 old posts from mine. These posts were associating my name with an

Re: [R] Privacy rights of an old user of this list

2013-09-12 Thread Albin Blaschka
Hello! Just a short question: If you publish something, say a paper or book or report (in dead tree format = on paper), do you ask libraries and owners of this publication also to throw it away, because it is old or you have changed positions? If in the academic world every scientist would

[R] Creating a map in R using ACS PUMS data

2013-09-12 Thread Chris Schatschneider
Hello all - does anyone know if there is a package in R that will allow me to create a map of the US (or individual states) that uses the American Community Survey PUMS boundaries? Thanks [[alternative HTML version deleted]] __

[R] Plot help

2013-09-12 Thread Moshiur Rahman
Hi R-helpers, Can anyone help me to give hints/packages to make a simple bar plot with mean and standard error of variables (A, C F) that I'd like to plot in X and the values in Y? The factor (sex) should be as legend (Male Female). Actually, I'd prefer to have a plot like the attached Fig.

Re: [R] substituting string variable in expression with its value

2013-09-12 Thread Jannis
Hi Gerrit, thanks for your suggestion. I want to create some code were I can supply the 'm*s^{-2}' part as an argument to a function and which evaluates this as an expression to use Rs mathematical annotation features in the labels. Any further ideas? Jannis On 12.09.2013 14:28, Gerrit

Re: [R] Privacy rights of an old user of this list

2013-09-12 Thread Duncan Murdoch
On 13-09-12 9:40 AM, John Gonzalez wrote: Dear subscribers of r-help, I would like to know your opinion about a privacy problem that I recently had after publishing to this list. Not a long time ago, I requested to the administrators of this list that they removed 2 or 3 old posts from mine.

[R] problem with rJython and modules

2013-09-12 Thread Erin Hodgess
Dear R People: I have been experimenting with rPython, rSymPy, and rJython. Here is my latest snag: library(rJython) Loading required package: rJava Loading required package: rjson library(rSymPy) rJython - rJython() x - x y - y rJython$exec(from sympy import *) Error in

Re: [R] Creating a map in R using ACS PUMS data

2013-09-12 Thread Anthony Damico
the smallest boundary in the 1-year acs files is public use microdata area (puma), but the 3- and 5-year public use microdata samples (pums) go down to some counties, i believe.. http://www.census.gov/acs/www/guidance_for_data_users/estimates/ i think you just need to download the census

Re: [R] Logged ratio as Dependent variable

2013-09-12 Thread Bert Gunter
What does this have to do with R? Post on a statistics list,like stats.stackexchange.com instead, please. Cheers, Bert On Thu, Sep 12, 2013 at 11:08 AM, Gary Dong pdxgary...@gmail.com wrote: Dear R users, I have a question regarding using logged ratio as dependent variable in regression.

Re: [R] Privacy rights of an old user of this list

2013-09-12 Thread Jeff Newmiller
Not only are you asking the administrators of an email list to alter data stored on systems other than the ones they control, you are suggesting that they can somehow alter search records stored in Google's servers. At best you are naive. That does not mean you are the only person with such

Re: [R] grep(pattern = each element of a vector) ?

2013-09-12 Thread arun
Hi, res- ddply(.data=df1,   .variables='Taxa',    .fun=transform,    Class=find.class(Taxa)) #Warning messages: #1: In grep(x, df2$Taxa) :  # argument 'pattern' has length 1 and only the first element will be used #2: In grep(x, df2$Taxa) :  # argument 'pattern' has length 1 and only

[R] princomp needs more obsverations than variables?

2013-09-12 Thread Hermann Norpois
Hello, I would like to do a pca with princomp. I have a dataset with different observations for each row and for different variables for each column (test.z). If I understood it correctly this is the way the data should be structured for princomp. But it does not work. But if I transpose the

[R] Package to manipulate timestamp data in format HH:MM:SS:sss

2013-09-12 Thread Alecia M Moser
Hello - I have imported timestamp data (collected in OpenSHAPA) into R as .csv file. Some columns in the data frame have timestamps in the format HH:MM:SS:sss. I have not found a package that will allow simple addition and subtraction of columns with this format, although 'strptime' in

Re: [R] Formula in a model

2013-09-12 Thread Bert Gunter
Paulito: Just my opinion: You wrote: Syntactically, I thought R is smart enough to detect that I'm using one of the columns because I use data=mytable syntax which means that input/output information are in the mytable. You appear to be suggesting that R do something contrary to what is

[R] on how to make a skip-table

2013-09-12 Thread Zhang Weiwu
I've got two data frames, as shown below: (NR means Number of Record) record.lenths NR length 1 100 2 130 3 150 4 148 5 100 683 760 valida.records NR factor

[R] grep(pattern = each element of a vector) ?

2013-09-12 Thread Beaulieu, Jake
Hi, I have a large dataframe that contains species names. I have a second dataframe that contains species names and some additional info, called 'Class', about each species. I would like match the species name is the first data frame with the 'Class' information contained in the second.

Re: [R] computationaly singular error!

2013-09-12 Thread Rose
Thanks Bert, all predictors are numerical. By the way, I have checked the collinearity of predictors by vif(). All vif of predictors were less than 2 that means none of the predictors are linear combinations of the others. Best, Rose -- View this message in context:

Re: [R] problem with rJython and modules

2013-09-12 Thread R. Michael Weylandt michael.weyla...@gmail.com
On Sep 12, 2013, at 13:42, Erin Hodgess erinm.hodg...@gmail.com wrote: Dear R People: I have been experimenting with rPython, rSymPy, and rJython. Here is my latest snag: library(rJython) Loading required package: rJava Loading required package: rjson library(rSymPy) rJython -

Re: [R] Package to manipulate timestamp data in format HH:MM:SS:sss

2013-09-12 Thread jim holtman
Use POSIXct for the date/time stamp. For your data you will have to substitute a period ('.') for the last colon (:), but that is easy to do with 'sub'. You will get millisecond precision, but just barely; don't try for microseconds since for that is the limit of precision with floating point

Re: [R] on how to make a skip-table

2013-09-12 Thread jim holtman
try this: record.length - read.table(text = NR length + 1 100 + 2 130 + 3 150 + 4 148 + 5 100 + 683 + 760, header = TRUE) valida.records - read.table(text = NR factor + 1

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread William Dunlap
If you want to find out if you've forgotten to make 'a' an argument you can use codetools::findGlobals(func) to list the names that don't refer to something already defined in the 'func': fun - function(b) a + b library(codetools) findGlobals(fun) [1] + a You need to filter out things

[R] How to avoid searching variables in global environment

2013-09-12 Thread Gang Peng
For example: a - 1 f - function(b){ return(a+b) } when we call function f(2), r will search the local environment first, if it cannot find a, it will search global environment, and return 3. How to avoid r searching the global environment and return an error when we call this function?

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread William Dunlap
Typo: in environment(fun) - new.env(parent=parent.env()) the parent.env() should have been emptyenv(). But, as I said, you do not want to do that. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org

[R] Shiny - can one create one RUN button?

2013-09-12 Thread Dimitri Liakhovitski
Hello! I am learning to use Shiny. Imagine my ui.r file contains two different inputs that I can change: sidebarPanel( numericInput(input1, My input 1:, 5), numericInput(input2, My input 2:, 10) ) And I am generating (in server.r file) the sum of those two using reactive({... If I change

Re: [R] gsub question

2013-09-12 Thread arun
Hi, Try:  string1- Red, Romeo, Calf  string2- Red, Rome, Ralf  string3- China, Japan, USA  gsub(R[[:alpha:]]{1,},MM,string3) #[1] China, Japan, USA gsub(R[[:alpha:]]{1,},MM,string2) #[1] MM, MM, MM  gsub(R[[:alpha:]]{1,},MM,string1) #[1] MM, MM, Calf Other way would be:  

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread Gang Peng
Hi Bert, Thanks for the explanation. In R, it first search the local environment and then the parent environment until the root environment (empty environment). I have a concern, when I write a function, I may write a variable name wrong by typo. But by coincidence, this variable name is defined

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread Duncan Murdoch
On 12/09/2013 5:54 PM, Gang Peng wrote: Hi Bill, Thanks. I think we can define the function in the environment whose parent environment is empty environment. But don't know how. You can say environment(f) - emptyenv() but then almost nothing will work. You wanted a+b. It won't know what +

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread Gang Peng
Hi Bill, Thanks. I think we can define the function in the environment whose parent environment is empty environment. But don't know how. Best, Mike 2013/9/12 William Dunlap wdun...@tibco.com If you want to find out if you've forgotten to make 'a' an argument you can use

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread Duncan Murdoch
On 12/09/2013 5:36 PM, Gang Peng wrote: Hi Bert, Thanks for the explanation. In R, it first search the local environment and then the parent environment until the root environment (empty environment). I have a concern, when I write a function, I may write a variable name wrong by typo. But by

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread Bert Gunter
No No! The parent environment is **not necessarily** the enclosing environment. The difference is crucial. R looks for free variables in the enclosing, **not** the parent environment (although they are often the same). Please read about lexical scoping in R in the R language definition manual, or

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread William Dunlap
You can do that with environment(fun) - new.env(parent=parent.env()) but then your function, function(b)a+b, will not be able to find the + function. Putting this code into a package simplifies things a lot. E.g., I added a file containing the two lines phi - sum(1/(1:1e6)) - log(1e6) #

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread Sarah Goslee
Hi, You need to specify that a is an argument to the function: On Thu, Sep 12, 2013 at 3:56 PM, Gang Peng michael.gang.p...@gmail.com wrote: For example: a - 1 f - function(b){ return(a+b) } f - function(b, a) { return(a+b) } when we call function f(2), r will search the local

Re: [R] on how to make a skip-table

2013-09-12 Thread Gang Peng
n.record - length(record.lenths$NR) index - record.lenths$NR %in% valida.records$NR tmp - 1:n.record ind - tmp[index] st - 1 skip - rep(0,length(ind)) for(i in 1:length(ind)){ if(stind[i]){ skip[i]-sum(record.lenths$ length[st:(ind[i]-1)]) } st - ind[i]+1 } 2013/9/12 Zhang Weiwu

[R] predict() from conditional logit model?

2013-09-12 Thread Marine Regis
Hello everybody, I used the function clogit() (package survival) to build a conditional logit model. This is the R output of my model : coef exp(coef) se(coef) robust se z Pr(|z|) anthro 2.14776 8.56565 0.09352 0.53989 3.978 6.94e-05 *** cor 0.92365 2.51846 0.07757 0.41944 2.202

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread Bert Gunter
Michael and Sarah: 1. Actually the original claim -- that R will search the global environment if it does not find a free variable in the function environment -- is not strictly true. It will search the function's enclosure and then on up the tree of enclosures. In this case, the enclosure was

[R] predict from tobit regression

2013-09-12 Thread didimayr
Dear R experts, I am currently working on a rather simple tobit regression, where the dependet variable is left-censored (0). I would like to apply a Tobit regression and then use the parameters of this regression to make a prediction with new data. The intention behind this is to do an

Re: [R] Plot help

2013-09-12 Thread Jim Lemon
On 09/13/2013 12:48 AM, Moshiur Rahman wrote: Hi R-helpers, Can anyone help me to give hints/packages to make a simple bar plot with mean and standard error of variables (A, C F) that I'd like to plot in X and the values in Y? The factor (sex) should be as legend (Male Female). Actually, I'd

Re: [R] princomp needs more obsverations than variables?

2013-09-12 Thread Greg Snow
Use the 'prcomp' function rather than 'princomp'. The help page for 'princomp' refers to 'prcomp' a couple of times, the last paragraph in the details section says that 'princomp' requires at least as many units as variables, then points to 'prcomp' as using the alternative method (which does not

Re: [R] princomp needs more obsverations than variables?

2013-09-12 Thread Bert Gunter
1. Yes it makes sense. 2. Use prcomp() instead. It will work with more variables than observations. -- Bert On Thu, Sep 12, 2013 at 7:31 AM, Hermann Norpois hnorp...@gmail.com wrote: Hello, I would like to do a pca with princomp. I have a dataset with different observations for each row

Re: [R] grep(pattern = each element of a vector) ?

2013-09-12 Thread Allen, Joel
Jake, You can use the plyr library or some form of apply. If you are on a 64bit system you can multithread and it goes much faster. something like this(for 32bit): require(plyr) df1 - data.frame(Taxa = c('blue', 'red', NA,'blue', 'red', NA,'blue', 'red', NA)) df2 - data.frame(Taxa = c( 'blue',

Re: [R] predict() from conditional logit model?

2013-09-12 Thread David Winsemius
On Sep 12, 2013, at 3:31 PM, Marine Regis wrote: Hello everybody, I used the function clogit() (package survival) to build a conditional logit model. This is the R output of my model : coef exp(coef) se(coef) robust se z Pr(|z|) anthro 2.14776 8.56565 0.09352 0.53989 3.978 6.94e-05 *** cor

Re: [R] Privacy rights of an old user of this list

2013-09-12 Thread David Winsemius
On Sep 12, 2013, at 8:40 AM, John Gonzalez wrote: Dear subscribers of r-help, I would like to know your opinion about a privacy problem that I recently had after publishing to this list. Not a long time ago, I requested to the administrators of this list that they removed 2 or 3 old

[R] Logged ratio as Dependent variable

2013-09-12 Thread Gary Dong
Dear R users, I have a question regarding using logged ratio as dependent variable in regression. I am reading a paper discussing how a waste management facility has influenced housing price in surrounding areas. The author used Ln(P2/P1) as the dependent variable, where P1 and P2 represent trade

[R] failure to replayPlot() a recordedplot object saved in a previous session?

2013-09-12 Thread MacQueen, Don
I have the following experience. If I use, for example, tmp - recordPlot() in a session, then immediately the saved plot replays successfully using replayPlot() in the same session. But not in the next R session. See examples below, copy/pasted from my shell window. The first R session is

[R] Deterministic initialization for k-means

2013-09-12 Thread Safiye Celik
Hi, I want to cluster my data points into K clusters using k-means algorithm, and I want to use a deterministic (non-random) initialization scheme which is also a good start. I found a paper by Ting Su and Jennifer Dy named A Deterministic Method for Initializing K-means Clustering and I wonder

Re: [R] on how to make a skip-table

2013-09-12 Thread arun
HI, May be this helps: record.length - read.table(text = NR    length     1  100     2  130     3  150     4  148     5  100     6    83     7    60, sep=,header = TRUE)  valida.records - read.table(text = NR    factor     1  3   

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread Michael Peng
I see. Thanks a lot for your help. M. 2013/9/12 Bert Gunter gunter.ber...@gene.com No No! The parent environment is **not necessarily** the enclosing environment. The difference is crucial. R looks for free variables in the enclosing, **not** the parent environment (although they are often

[R] xtable use plus minus

2013-09-12 Thread Sachinthaka Abeywardana
I am using a similar dataset to the following: a= c(Fruits, Adam,errorA, steve, errorS, apples, 17.1,2.22, 3.2,1.1, oranges, 3.1,2.55, 18.1,3.2 ) a_table=data.matrix(t(matrix(a,nrow=5))) I would like to plus minus every second column starting from errorA (using xtable/ hmisc) example

Re: [R] How to avoid searching variables in global environment

2013-09-12 Thread Michael Peng
I thought '+' was defined in a more basic level. I usually use CPP. R is very different from CPP in many basic concepts. M. 2013/9/12 William Dunlap wdun...@tibco.com Typo: in environment(fun) - new.env(parent=parent.env()) the parent.env() should have been emptyenv(). But, as I said,

Re: [R] xtable use plus minus

2013-09-12 Thread arun
Hi, Try: a_table[grep(\\d+,a_table)]- paste0(a_table[grep(\\d+,a_table)],$\\pm$) library(xtable)  print(xtable(a_table),sanitize.text.function=identity) % latex table generated in R 3.0.1 by xtable 1.7-1 package % Thu Sep 12 21:26:45 2013 \begin{table}[ht] \centering \begin{tabular}{rl}  

Re: [R] Subtracting elements of a vector from each other stepwise

2013-09-12 Thread Ben Bolker
On 13-09-11 07:06 PM, Ben Harrison wrote: If I were Michael (OP) right now, I think my head would be spinning. As a newbie myself, I know how hard it is to read R code for the first time, so could it also be part of the newsgroup etiquette to at least partially explain provided code to

Re: [R] substituting string variable in expression with its value

2013-09-12 Thread William Dunlap
Is this what you want? myTitle - function (name, unitsExpr = parse(text = unitsString)[[1]], unitsString) { name - as.name(name) bquote(.(name) ~ [ * .(unitsExpr) * ]) } plot(1,1,xlab=myTitle(velocity, quote(km/hr)), ylab=myTitle(distance, quote(light~years))) Note that unitsExpr

Re: [R] Privacy rights of an old user of this list

2013-09-12 Thread S Ellison
I would like to know your opinion about a privacy problem that I recently had after publishing to this list. Well, in short, you appear to have wilfully ignored the terms of membership of the list, posted intentionally on a public mailing list without checking where the posts would end up,

Re: [R] computationaly singular error!

2013-09-12 Thread Rose
I have 8 predictors and 1144 observations over 13 years. I think it is not the case. -- View this message in context: http://r.789695.n4.nabble.com/computationaly-singular-error-tp4675810p4675962.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] computationaly singular error!

2013-09-12 Thread S Ellison
Error in solve.default(H, g[!fixed]) : system is computationally singular: reciprocal condition number = 4.65795e-19 Maybe you have more predictors than data? S Ellison *** This email and any attachments are

Re: [R] computationaly singular error!

2013-09-12 Thread Bert Gunter
... or some of the predictors are (near) linear combinations of others. This often occurs when some of the predictors are categorical/factors with lots of levels. Cheers, Bert On Thu, Sep 12, 2013 at 8:45 AM, S Ellison s.elli...@lgcgroup.com wrote: Error in solve.default(H, g[!fixed]) :

Re: [R] meta-analysis of annualized event rate

2013-09-12 Thread Michael Dewey
At 18:51 11/09/2013, petre...@unina.it wrote: r-help@r-project.org Dear all, I use R 2.15.2 for Windows 8 I ask if it is possible perform a meta-analysis of annualized event rate from several studies reporting Try metafor (from CRAN) Look in the help for escalc for incidence rate ratio

Re: [R] xtable use plus minus

2013-09-12 Thread arun
Hi, Also: a_table[grep(\\d+,a_table)]-paste0(sprintf(%.2f,as.numeric(a_table[grep(\\d+,a_table)])),$\\pm$) # 2 d.p. print(xtable(a_table),sanitize.text.function=identity) A.K. - Original Message - From: arun smartpink...@yahoo.com To: Sachinthaka Abeywardana

Re: [R] xtable use plus minus

2013-09-12 Thread Duncan Mackay
Here is a start a= c(Fruits, Adam,errorA, steve, errorS, apples, 17.1,2.22, 3.2,1.1, oranges, 3.1,2.55, 18.1,3.2 ) a_table=data.matrix(t(matrix(a,nrow=5))) # restructure data ahead = a_table[1,] atab - data.frame(a_table[-1,]) for (j in 2:5) atab[,j]=trunc(as.numeric(atab[,j]))

Re: [R] xtable use plus minus

2013-09-12 Thread arun
HI, Sorry, there was a mistake as I didn't properly looked at the output you wanted. a_tableNew- data.matrix(matrix(0,3,3)) a_tableNew[2:3,2:3]-paste0(sprintf(%.2f,as.numeric( a_table[,seq(2,5,2)][grep(\\d+,a_table[,seq(2,5,2)])])),$\\pm$,sprintf(%.2f,as.numeric(

[R] FW: predict() from conditional logit model?

2013-09-12 Thread Marine Regis
Hello everybody, Thank you David for your answer. Sorry I am beginner with cox model and R software. Is it possible to do predictions from newdata which has a size equal to the vector hour - seq(0,23.99,0.1) ? In fact, I don't know how to define parameters cluster and strata in the newdata

Re: [R] on how to make a skip-table

2013-09-12 Thread Zhang Weiwu
It is a nice surprise to wake up receiving three answers, all producing correct results. Many thanks to all of you. Jim Holtman solved it with amazing clarity. Gang Peng using a traditioanl C-like pointer style and Arun with awesome tight code thanks to diff(). I am embrassed to see my

Re: [R] help with a simple function

2013-09-12 Thread arun
Hi, rownames(y_raw_mt)=y_raw[,1] ## y_raw not defined. set.seed(25) mat1- matrix(sample(c(NA,1:20),100,replace=TRUE),20,5) #changed the function to process 'mat1'.  Also, it is better to read the file separately and check ?str(dt.table) before proceeding. write.table1=function(durty_data){