[R] debugging R

2012-02-05 Thread Alaios
Dear all, I am using browse() to debug my R applications. My problem is that I need a bit more control of the debugging process.   For example 'I want R to stop at the 7th iteration and check. One can do think that I can put the browse inside an if statement but this limits by lot the

Re: [R] debugging R

2012-02-05 Thread Gabor Grothendieck
On Sun, Feb 5, 2012 at 3:01 AM, Alaios ala...@yahoo.com wrote: Dear all, I am using browse() to debug my R applications. My problem is that I need a bit more control of the debugging process. For example 'I want R to stop at the 7th iteration and check. One can do think that I can put the

[R] Grouping miliseconds By Hours

2012-02-05 Thread Hasan Diwan
I have a list of numbers corresponding to timestamps, a sample of which follows: c(1327211358, 1327221999, 1327527296, 1327555433, 1327701042, 1327761389, 1327780993, 1327815670, 1327822964, 1327897497, 1327897527, 1327937072, 1327938300, 1327957589, 1328044466, 1328127921, 1328157588, 1328213951,

Re: [R] problem with windows metafile

2012-02-05 Thread Karoline Morling
Thanks for your answer. You're right, when I'm looking at the files with IrfanView everything is ok. you need to learn how to shrink the full image into the display window. guess, that's what I'm lacking... I tried to make the graphics smaller in R, but it doesn't have any effect, when

[R] how to avoid writing index in write.table command

2012-02-05 Thread sagarnikam123
how to avoid writing index of variable in write.table command, e.g. output--- index,character,state 1 M 2 2 K 3 3 R 1 4 E 1 5 S 1 6 H 1 7 K 1 8 H 1 9 A 1 10 E 3 11 Q 1 i tried col.name=FALSE row.name=FALSE but it can't -- View this message in context:

Re: [R] Problem with xtable- rescaling a table

2012-02-05 Thread Tal Galili
Dear Ista, Do you happen to know of a way to use the {tabularx} LaTeX pacakge, so to have it work with xtables? I would rather have my columns adjust themselves then to rotate my table. Thank you in advance, Tal Contact

Re: [R] plotting confidence bands from predict.nls

2012-02-05 Thread ioanna
How do you use bootstrap to estimate the confidence as well as the prediction intervals in nonlinear regression ? -- View this message in context: http://r.789695.n4.nabble.com/plotting-confidence-bands-from-predict-nls-tp3505012p4358572.html Sent from the R help mailing list archive at

Re: [R] debugging R

2012-02-05 Thread michael.zombok
Hi Alex, some hints and advices on debugging can be found in the 'Writing R Extensions Manual': http://cran.r-project.org/doc/manuals/R-exts.html#Debugging-R-code Depending on the IDE/editor you are using, there may be additional debugging tools/options, but without further informations about

Re: [R] how to avoid writing index in write.table command

2012-02-05 Thread Tal Galili
write.table(..., row.names = FALSE) (not row.name ) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] plotting confidence bands from predict.nls

2012-02-05 Thread Prof Brian Ripley
On 05/02/2012 08:10, ioanna wrote: How do you use bootstrap to estimate the confidence as well as the prediction intervals in nonlinear regression ? With difficulty! There is far too little here to go on, and this seems an odd question unless it is homework (why dictate a problem-strewn

Re: [R] debugging R

2012-02-05 Thread Duncan Murdoch
On 12-02-05 3:01 AM, Alaios wrote: Dear all, I am using browse() to debug my R applications. My problem is that I need a bit more control of the debugging process. For example 'I want R to stop at the 7th iteration and check. One can do think that I can put the browse inside an if statement

[R] vectors of matrix as iinput to lapply

2012-02-05 Thread Alaios
Dear all I am using lapply (actually mclapply that share the same syntax). I want to call the same function that takes as input a vector. My initial data structure is a matrix that I want to cut it to multiple vectors (one vector for every row of the matrix) and then feed that to the function

Re: [R] Grouping miliseconds By Hours

2012-02-05 Thread jim holtman
Is this what you are after: x - c(1327211358, 1327221999, 1327527296, 1327555433, 1327701042, + 1327761389, 1327780993, 1327815670, 1327822964, 1327897497, 1327897527, + 1327937072, 1327938300, 1327957589, 1328044466, 1328127921, 1328157588, + 1328213951, 1328236836, 1328300276, 1328335936,

Re: [R] Problem with xtable- rescaling a table

2012-02-05 Thread Ista Zahn
Hi Tal, Untested, but it should just be a matter of giving tabularx style formatting in the align option to xtable(), and then using tabularx as the tabular.environment argument to print.xtable() see ?xtable and ?print.xtable for details. Best, Ista On Sunday, February 05, 2012 01:16:38 PM

[R] R-Censoring

2012-02-05 Thread Grace Kambey
Hi there, can somebody give me a guide as to how to generate data from weibull distribution with censoring for example, the code below generates only failure data, what do i add to get the censored data, either right or interval censoring q-rweibull(100,2,10). Thank you Grace Kam student,

Re: [R] vectors of matrix as iinput to lapply

2012-02-05 Thread Petr Savicky
On Sun, Feb 05, 2012 at 06:54:02AM -0800, Alaios wrote: Dear all I am using lapply (actually mclapply that share the same syntax). I want to call the same function that takes as input a vector. My initial data structure is a matrix that I want to cut it to multiple vectors (one vector for

[R] R-Censoring

2012-02-05 Thread Grace Kambey
Hi there, can somebody give me a guide as to how to generate data from weibull distribution with censoring for example, the code below generates only failure data, what do i add to get the censored data, either right or interval censoring q-rweibull(100,2,10). Thank you Grace Kam student,

[R] Covariate model in nlme

2012-02-05 Thread SHAILLY MEHROTRA
Dear R users, I am using nlme to fit a pharmacokinetic model. The base model is parameterized in terms of CL, V1, V2 and Q. basemodel-nlme(Conc ~TwoCompModel(CL,Q,V1,V2,Time,ID), data = data2, fixed=list(CL+Q+V1+V2~1), random = pdDiag(CL+V1+V2~1),

Re: [R] Library (tm) Error: could not find function TermDocMatrix.

2012-02-05 Thread Mickaël Clévenot
It's jsut a vocabulry trouble. The good name is TermDocumentMatrix. Certainly it's depend of the version of TM. best regards __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] unlink: parameter force not available in R windows version

2012-02-05 Thread mails
Hi Brian, that explains it. I will update R to 2.14.x tomorrow. Thanks for your post. -- View this message in context: http://r.789695.n4.nabble.com/unlink-parameter-force-not-available-in-R-windows-version-tp4357464p4358761.html Sent from the R help mailing list archive at Nabble.com.

[R] Simulating from a Normal Inverted Wishart distribution

2012-02-05 Thread Shantanu MULLICK
Hello everyone I was wondering how would one simulate from a Normal Wishart Distribution in R. A normal inverted Wishart distribution is denoted by NIW (M,C,d,S), where X/(Sigma) ~ N( M,C,(Sigma) ) - a matrix normal distribution, (Sigma) - column dispersion matrix (Sigma) ~ IW (d,S) -

Re: [R] R - Array data loop selection

2012-02-05 Thread David Winsemius
On Feb 4, 2012, at 8:29 PM, dengyu19901102 wrote: i want to select June, July and August data from the 3D array (`ssta_sst`, 360*180*362). the loop works but the output of ssta_winter has the identical values for `ssta_winter[,,i]`.seen below. I have set it up as an array of

Re: [R] plotting confidence bands from predict.nls

2012-02-05 Thread ioanna
It is not homework. My problem is this: I used nonlinear regression to fit a lognormal cumulative distribution to the probability of a buildings' collapse against a measure of seismic intensity. I am able to obtain the asymptotic confidence intervals. I am not , however, certain that they are

Re: [R] Simulating from matrix variate normal distribution

2012-02-05 Thread Shantanu MULLICK
This was indeed very helpful - thanks a lot ! :-)) On 4 February 2012 14:56, Ranjan Maitra mai...@iastate.edu wrote: I think this should be easy to write a function doing this. Assume that Y is matrix normal with mean matrix mu and row and column dispersion matrices Sigma and Gamma,

Re: [R] how to avoid writing index in write.table command

2012-02-05 Thread David Winsemius
On Feb 5, 2012, at 2:53 AM, sagarnikam123 wrote: how to avoid writing index of variable in write.table command, e.g. output--- It's time to get with the program, sagarnikam123. You are asked in the Posting Guide to provide a reproductible example. At the very least you should provide

Re: [R] Grouping miliseconds By Hours

2012-02-05 Thread David Winsemius
On Feb 5, 2012, at 9:54 AM, jim holtman wrote: Is this what you are after: x - c(1327211358, 1327221999, 1327527296, 1327555433, 1327701042, + 1327761389, 1327780993, 1327815670, 1327822964, 1327897497, 1327897527, + 1327937072, 1327938300, 1327957589, 1328044466, 1328127921, 1328157588,

[R] R- Fisher Information

2012-02-05 Thread Christopher Kelvin
Dear All, Can you help me, with the code below how do I obtain the fisher information from it. Is my q-replicate(1000,x) the right way to do simulation. thank you. x-rweibull(100,0.8,1.5) q-replicate(1000,x) z-function(p){ beta-p[1] eta-p[2]

[R] (sin asunto)

2012-02-05 Thread Luis Solis
-- Luis Solís __ 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] vectors of matrix as iinput to lapply

2012-02-05 Thread Poersching
Am 05.02.2012 15:54, schrieb Alaios: Dear all I am using lapply (actually mclapply that share the same syntax). I want to call the same function that takes as input a vector. My initial data structure is a matrix that I want to cut it to multiple vectors (one vector for every row of the

Re: [R] R- Fisher Information

2012-02-05 Thread David Winsemius
On Feb 5, 2012, at 1:20 PM, Christopher Kelvin wrote: Dear All, Can you help me, with the code below how do I obtain the fisher information from it. A modest amount of searching the archives (which is really your responsibility): search.r-project.org/cgi-bin/namazu.cgi?query=fisher +

Re: [R] How to Calculate Percentage of Data within certain SD of Mean

2012-02-05 Thread Pete Brecknock
How about # Read Data nb10 - read.table(http://www.adjoint-functors.net/su/web/314/R/NB10;) # Calculate Stats total = length(nb10[,1]) mean = mean(nb10[,1]) sd = sd(nb10[,1]) # Function ... nSD is the number of SD you are looking at pData - function(nSD){ lo = mean - nSD/2*sd hi =

Re: [R] text command - how to get a white background to cover grid lines

2012-02-05 Thread Pete Brecknock
How about using the legend function ... plot(rnorm(100)) legend(60,2,100 Random Normal Draws,cex=.8,text.col=blue, box.col=red,bg=yellow) You can customize my effort to fit your specific needs HTH Pete Henry wrote New to R - rookie question. I'm a mechanical engineer and enjoying using

[R] Author@R

2012-02-05 Thread Matyas Sustik
Hi All, Could someone point me to an example on how to use Author@R in a package DESCRIPTION file? Say with 2 authors: John Doe and Jane Doe, the latter is a maintainer which could replace: Author: John Doe, Jane Doe Maintainer: Jane Doe Both ‘Author’ and ‘Maintainer’ can be omitted (as from R

Re: [R] Makefile to compile .so in src (was: Re: automated libR location)

2012-02-05 Thread Matyas Sustik
Hi Uwe, 1. I don't believe you really need all the flags from above. If so, within a package, use a Makevars file. 2. R CMD SHLIB QUIC.cpp shoudl do the trick already, perhaps some linker flags are required for blas that can be specified in the same line, see R CMD SHLIB --help Thanks, I

[R] revision tags in package files

2012-02-05 Thread Matyas Sustik
Hi All, I am building my first package. I have the files under revision control. Normally, I have a $Id$ tag in my files which expand by my editor and so the current revision etc. I tried to add it to the DESCRIPTION file by having the first line to be: # $Id$ R CMD build complained. I hoped

[R] nested if else statements

2012-02-05 Thread Philip Robinson
I have a vector of 2,1,0 I want to change to 0,1,2 respectively (the data is allele dosages) I have tried multiple nested if/else statements and looked at the ?if help and cannot work out what is wrong, other people have posted code which is identical and they state works. Any help would be

Re: [R] Author@R

2012-02-05 Thread Achim Zeileis
On Sun, 5 Feb 2012, Matyas Sustik wrote: Hi All, Could someone point me to an example on how to use Author@R in a package DESCRIPTION file? There is an introduction in the following report: http://epub.wu.ac.at/3269/ Say with 2 authors: John Doe and Jane Doe, the latter is a maintainer

Re: [R] nested if else statements

2012-02-05 Thread David Winsemius
On Feb 5, 2012, at 5:30 PM, Philip Robinson wrote: I have a vector of 2,1,0 I want to change to 0,1,2 respectively (the data is allele dosages) I have tried multiple nested if/else statements and looked at the ? if help and cannot work out what is wrong, other people have posted code

Re: [R] nested if else statements

2012-02-05 Thread David Winsemius
On Feb 5, 2012, at 5:30 PM, Philip Robinson wrote: I have a vector of 2,1,0 I want to change to 0,1,2 respectively (the data is allele dosages) I have tried multiple nested if/else statements and looked at the ? if help and cannot work out what is wrong, other people have posted code

Re: [R] nested if else statements

2012-02-05 Thread R. Michael Weylandt
Much easier: use ifelse (the vectorized function) instead as follows: ifelse(A 2, ifelse(A 1, 2, 1), 0) But you could probably just do 2 - A in this case which would be easiest. Michael On Sun, Feb 5, 2012 at 5:30 PM, Philip Robinson philip.c.robin...@gmail.com wrote: I have a vector of

Re: [R] Author@R

2012-02-05 Thread Matyas Sustik
Thanks for the quick response! That is exactly what I was looking for. On Sun, Feb 5, 2012 at 4:34 PM, Achim Zeileis There is an introduction in the following report: http://epub.wu.ac.at/3269/ [...] Authors@R: c(person(given = John, family = Doe, role = aut),  person(given = Jane, family =

Re: [R] nested if else statements

2012-02-05 Thread Joshua Wiley
Hi Philip, You have gotten several good responses. For a generalization of this, I would suggest _not_ using nested if or ifelse statements. They quickly become difficult to read. d - c(1, 1, 2, 2, 2, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0) require(car) dnew - recode(d, 2 = 0; 1 = 1; 0 =

Re: [R] Author@R

2012-02-05 Thread Achim Zeileis
On Sun, 5 Feb 2012, Matyas Sustik wrote: Thanks for the quick response! That is exactly what I was looking for. You're welcome. On Sun, Feb 5, 2012 at 4:34 PM, Achim Zeileis There is an introduction in the following report: http://epub.wu.ac.at/3269/ [...] Authors@R: c(person(given =

[R] how do I exort a list of numbers into csv file?

2012-02-05 Thread Michael
Hi all, I have a list of vector of numbers - the reason I used list of vector was that I each list have different numbers of numbers which I don't know before run-time. mylist[[1]] = c(1, 2, 3) mylist[[2]] = c (3, 4, 5, 6) ... ... etc. Could you please tell me if there is a way to dump all

Re: [R] replace some values of a column with diffrent values

2012-02-05 Thread Pete Brecknock
Hi Valerie One way would be to use the match function. # Your Data u =data.frame(coe=c(0,0,0,0,0,0,0,0), name=c(Time,Poten,AdvExp,Share,Change,Accounts,Work,Rating)) v = data.frame(coeff=c(0.7272727,0.322,0.0500123), enter=c(Accounts,Time,Poten)) # Match

Re: [R] how do I exort a list of numbers into csv file?

2012-02-05 Thread Joshua Wiley
Hi Michael, Part of me imagines this is overkill, but this should be one option: ## your data mylist - list(1:3, 3:6) ## open a writeable connection to a file con - file(test.csv, w) ## first collapse each element of the list to be a comma separated string, then write each ## element of new

Re: [R] how do I exort a list of numbers into csv file?

2012-02-05 Thread baptiste auguie
Hi, If you don't mind having NAs for missing values, try the following, mylist = list(1:3, 4:7) library(plyr) write.csv(do.call(rbind.fill.matrix, lapply(mylist, matrix, nrow=1)), file=) HTH, b. On 6 February 2012 15:01, Michael comtech@gmail.com wrote: Hi all, I have a list of vector

[R] [newbie] storage/use of user's own functions?

2012-02-05 Thread Tom Roche
I'm new but am already starting to accumulate utility functions for the fairly specialized kinds of data files with which I work. I'd like to keep those functions in a single folder, or filetree rooted at a specific folder under my $HOME (I'm running linux), for ease of * source()-ing * git

[R] Goodness of Fit for Archimedean Copulas

2012-02-05 Thread cahaya iman
Dear All, I'm now looking for R-code on how to find the Goodness of Fits for Archimedean Copulas. If anyone have a guide for this problems please lets me know. Your prompt action is much appreciated. Regards, Ummul [[alternative HTML version deleted]]

Re: [R] [newbie] storage/use of user's own functions?

2012-02-05 Thread Joshua Wiley
Hi Tom, I don't believe there is a standard location. You can set variables or have functions run (say to source other functions in) in your .Rprofile file. That way, you always have them. Once you get more than a handful of functions, it is probably time to consider putting them into your

[R] RandomForest ... Always Returning a 1?

2012-02-05 Thread apresley
We have a pretty simple R forecasting problem, using randomForest. Our script is below. We have data with about 6 columns, and 625 rows to do the training on, and then we're trying to forecast 90 or so rows. The x matrix has 3 years worth of sales data, starting at 6:15am. However, for some

[R] how to REPLACE VALUES in a dataframe

2012-02-05 Thread Valerie Moore
Hi, I have two data frames (u and v). u   coe nam 1   0 Time 2   0    Poten 3   0   AdvExp 4   0    Share 5   0   Change 6   0 Accounts 7   0 Work 8   0   Rating v   coeff    enter 1 0.7272727 Accounts 2 0.322 Time 3 0.0500123    Poten I want to update the values

Re: [R] Simulating from a Normal Inverted Wishart distribution

2012-02-05 Thread Ranjan Maitra
You can first simulate Sigma from the inverse Wishart distribution and then simulate from the matrix normal given the realized Sigma. As per a DuckDuckGo search, InvWishart function in the contributed R package MCMCpack may be what you need for the first step. HTH, Ranjan On Sun, 5 Feb 2012

[R] How to fetch data from MySql DB using Quantmod package?

2012-02-05 Thread Ashy43
Hi All, Currently I am using R 2.14.0 version in which RMySQL package is available to establish connection with MySql database. I want to use'quantmod' package which is use for stock charts. Could anyone tell how to establish connection to MySQL DB in quantmod package? I have tried but got the

[R] text command - how to get a white background to cover grid lines

2012-02-05 Thread Henry
New to R - rookie question. I'm a mechanical engineer and enjoying using R to make high quality graphs. I've searched. I want to put text notation on graph plot areas and have the text background box white to cover over the grid lines. my command so far text(15,5200,Air

Re: [R] R - Array data loop selection

2012-02-05 Thread dengyu19901102
the structure of ssta_sst can be seen below. dim(ssta_sst) [1] 360 180 362 Also, the debugging for temp is right. The problem for that code is the temp doesn't pass down as it suppose to be, it only gives the last value in 2010. for (yr in 1982:2010) { + temp - ssta_sst[,,year_sst==yr

[R] How to Calculate Percentage of Data within certain SD of Mean

2012-02-05 Thread Ajata Paul
How do you calculate the percentage of data within 2SD, 3SD, 4SD, 5SD, and 6SD of the mean? I used the following link as the data I'm working with: nb10 - read.table(http://www.adjoint-functors.net/su/web/314/R/NB10;) if this helps answer my question. Can you please explain how to calculate the

Re: [R] R - Array data loop selection

2012-02-05 Thread dengyu19901102
Don't worry, i have figured it out. I forgot the most basic method by adding another increasing loop counter. k=0 for (yr in 1982:2010) { temp - ssta_sst[,,year_sst==yr (month_sst=6 month_sst=8)] k=k+1 for (i in 1:360) { for (j in 1:180) {

[R] histogram

2012-02-05 Thread Francis Keyes
With R and the hist function, is there a way to make a histogram in which the y axis denotes propotion with respect to a separate sample dataset of the same range instead of frequency? [[alternative HTML version deleted]] __

Re: [R] how do I exort a list of numbers into csv file?

2012-02-05 Thread Jim Holtman
michael, what is the problem you are trying to solve? are you writing it out so you can read it back in? if so, look at 'save/load' or 'dump/source'. is this the format required by some other program? Sent from my iPad On Feb 5, 2012, at 21:54, baptiste auguie

[R] Simple lm/regression question

2012-02-05 Thread James Annan
I am trying to use lm for a simple linear fit with weights. The results I get from IDL (which I am more familiar with) seem correct and intuitive, but the lm function in R gives outputs that seem strange to me. Unweighted case: x-1:4 y-(1:4)^2 summary(lm(y~x)) Call: lm(formula = y ~ x)

Re: [R] how to REPLACE VALUES in a dataframe

2012-02-05 Thread Jim Holtman
indx - match(u$nam, v$enter, nomatch = 0) u$coe[indx != 0] - v$coeff[indx] Sent from my iPad On Feb 5, 2012, at 15:45, Valerie Moore vmoore2...@yahoo.com wrote: Hi, I have two data frames (u and v). u coe nam 1 0 Time 2 0Poten 3 0 AdvExp 4 0Share 5 0

Re: [R] R - Array data loop selection (Solved)

2012-02-05 Thread David Winsemius
This must be the same poster who reports on SO that _he_ figured out the problem. -- David. On Feb 5, 2012, at 6:01 PM, dengyu19901102 wrote: the structure of ssta_sst can be seen below. dim(ssta_sst) [1] 360 180 362 Also, the debugging for temp is right. The problem for that code is

Re: [R] histogram

2012-02-05 Thread David Winsemius
On Feb 5, 2012, at 8:31 PM, Francis Keyes wrote: With R and the hist function, is there a way to make a histogram in which the y axis denotes propotion with respect to a separate sample dataset of the same range instead of frequency? hist() returns an object with both counts and density.

Re: [R] RandomForest ... Always Returning a 1?

2012-02-05 Thread Peter Langfelder
Well, if you look at your data more carefully, you will see that the histogram of y is heavily skewed towards 1 (small values). The 91/625 quantile is still 1 (there are 192 1s). It is therefore not surprising that RF comes up with mostly 1s (in my attempt it came up with two 2s, but that is a bit

Re: [R] RandomForest ... Always Returning a 1?

2012-02-05 Thread Anthony Presley
Peter, Thanks for checking on this! We're having some difficulties forecasting sales ... randomForest is doing a great job on days and periods where there is high variability. However, such as in this case, we do get dates/times/departments where it simply forecasts the most frequent value (I

Re: [R] how do I exort a list of numbers into csv file?

2012-02-05 Thread ilai
cat will wrap Josh's overkill approach in one line: mylist- list(1:3,3:9) lapply(mylist , cat , sep=',' , fill=T , append=T , file='foo.csv') Cheers On Sun, Feb 5, 2012 at 7:42 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: Hi Michael, Part of me imagines this is overkill, but this should be

[R] R-RApache to develop Knowledge Base

2012-02-05 Thread MLSC
Hi all, I need your opinion about using R-Rapache to build a knowlegde base to bioinformatics field. I have copious amount of genotype information (some few million records) and would like to store it in MySQL database. Then, using RMySQL connector I would like to use it for further analysis

[R] rounding of integer

2012-02-05 Thread arunkumar1111
Hi I need to round integer \ eg if my value is 1003 i want to make it 1000 Thanks in advance - Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/rounding-of-integer-tp4360549p4360549.html Sent from the R help mailing list archive at

Re: [R] rounding of integer

2012-02-05 Thread David Winsemius
On Feb 6, 2012, at 1:40 AM, arunkumar wrote: Hi I need to round integer \ eg if my value is 1003 i want to make it 1000 ?round -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list

Re: [R] rounding of integer

2012-02-05 Thread Jorge I Velez
Try round(1003, digits = -3) HTH, Jorge.- On Mon, Feb 6, 2012 at 1:40 AM, arunkumar wrote: Hi I need to round integer \ eg if my value is 1003 i want to make it 1000 Thanks in advance - Thanks in Advance Arun -- View this message in context:

Re: [R] replace some values of a column with diffrent values

2012-02-05 Thread Petr PIKAL
Hi For such tasks I would use merge merge(u, v, by.x=name, by.y = enter, all.x=TRUE) If you do not want coe column anymore you can easily get rid of it. Regards Petr Hi Valerie One way would be to use the match function. # Your Data u =data.frame(coe=c(0,0,0,0,0,0,0,0),

[R] i want to retrieve count for each freq of given summary from table()

2012-02-05 Thread sagarnikam123
i want to retrieve count for each freq of given summary from table() e.g. A cout,B count save it in different variables table(dil) dil A C D E F G H I K L M N P Q 49433 10361 38490 44549 27182 44947 16310 39002 39829 58805 11228 29320

Re: [R] i want to retrieve count for each freq of given summary from table()

2012-02-05 Thread Petr PIKAL
Hi Can you be more specific? What else do you want? x-table(sample(letters[1:5], 100, replace=TRUE)) x a b c d e 20 14 23 23 20 as.numeric(x) [1] 20 14 23 23 20 y-as.numeric(x) Regards Petr i want to retrieve count for each freq of given summary from table() e.g. A cout,B count