[R] Searching from Dataframe.

2012-09-11 Thread Rantony
Hi, i have a dataframe containing some values. for eg:- MyDataFrame<- Name Age Place -------- Aby 12USA Raj25UK Romi32ENG Amy 31IND My requirement what is, i have a search key word[it should search fr

Re: [R] Searching from Dataframe.

2012-09-11 Thread Rantony
Thank you David. From: David Winsemius [via R] [mailto:ml-node+s789695n4642725...@n4.nabble.com] Sent: Tuesday, September 11, 2012 12:53 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Searching from Dataframe. On Sep 11, 2012, at 12:11 AM, Rantony wrote: > Hi, > i

Re: [R] Searching from Dataframe.

2012-09-11 Thread Rantony
From: Rantony [via R] [mailto:ml-node+s789695n464274...@n4.nabble.com] Sent: Tuesday, September 11, 2012 4:30 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Searching from Dataframe. And how to get the vector from a list if the list item found inside ? for eg:- MyList<- c(

Re: [R] Searching from Dataframe.

2012-09-11 Thread Rantony
How can I get index from a list if I know the listitem ? For eg:- Mylist<-c("A","B","C") Acually,Here I need to get the index of "B" as 2. From: arun kirshna [via R] [mailto:ml-node+s789695n4642756...@n4.nabble.com] Sent: Tuesday, September 11, 2012 5:56 PM To: Akkara, Antony (GE Energy, No

Re: [R] Searching from Dataframe.

2012-09-11 Thread Rantony
And how to get the vector from a list if the list item found inside ? for eg:- MyList<- c("US","UK","UAE") Here i want to check a list item UAE which is in 3rd row. How i will get that row position ? - Thanks in advance Antony -- View this message in context: http://r.789695.n4.nabble.com/Se

[R] Remove serial number column in a Dataframe into CSV

2012-09-13 Thread Rantony
Hi, i have an small doubt. How can we remove serial-number column while writing a dataframe in to a csv file ? for eg:- write.csv(MyDataFrame,"c:/MyData.csv") name place --- --- 1 antonyuk 2 john usa 3 arjun ind here, in

[R] Zip a file

2012-09-13 Thread Rantony
Hi, How to zip a csv file ? i tried with "zipfile.ZipFile" - but it showing function could not find. Is there have any other way to zip files without installing any package ? - Thanks in advance Antony -- View this message in context: http://r.789695.n4.nabble.com/Zip-a-file-tp4643012.html Se

Re: [R] Remove serial number column in a Dataframe into CSV

2012-09-13 Thread Rantony
Thanks. From: Pramod [via R] [mailto:ml-node+s789695n4642989...@n4.nabble.com] Sent: Thursday, September 13, 2012 1:27 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Remove serial number column in a Dataframe into CSV Add another argument to write.csv(MyDataFrame,"c:/MyData.csv",ro

Re: [R] Zip a file

2012-09-17 Thread Rantony
zip(zipfile, files, flags = "-r9X", extras = "", zip = Sys.getenv("R_ZIPCMD", "zip")) A.K. - Original Message - From: Rantony <[hidden email]> To: [hidden email] Cc: Sent: Thursday, September 13, 2012 8

Re: [R] Zip a file

2012-09-18 Thread Rantony
n use 7-zip or other WinZip. Is there any specific reason for you to zip files within R? A.K. - Original Message - From: Rantony <[hidden email]> To: [hidden email] Cc: Sent: Monday, September 17, 2012 3:07 AM Subject: Re: [R] Zip a file Hi Arun, I tried th

[R] Start and End day of a month

2012-09-27 Thread Rantony
Hi, Can anyone please help to get "StartDay" and "End-day of a particular month" with time ? For eg:- Input wil be "2012-09-27" i need to get output as given below StartDt <- "2012-09-01 00:00:01" EndDt <- "2012-09-30 23:59:59" - Thanks in advance -- View this message in context: http://r.

[R] Minute Difference

2012-10-05 Thread Rantony
Hi, Here i have a time along with date, for eg:- "10/5/2012 5:05:00 AM" i need to do minus 10 minutes along current date Like this :- "10/5/2012 4:55:00 AM" Thanks in Advance Antony -- View this message in context: http://r.789695.n4.nabble.com/Minute-Difference-tp4645157.html Sent from the

[R] Update CSV file content

2012-10-08 Thread Rantony
Hi, Here i have a csv file, it contain like this NAME UPDATED - -- ABCINDIA XYZ UK My requirement what is, i need to change the value inside the csv file (instead of INDIA i need to make it USA). NAME UPDATED - -- ABCUSA XY

[R] Send Email from R

2012-10-09 Thread Rantony
Hi, i wanted to send a mail from R (using Eclips). Currently i installed the following packages base64_1.1 sendmailR_1.1-1 mail_1.0.tar.gz Rmail_1.1.tar.gz But while installing package some error was occuring. Any other way to send a mail ? - Thanks in advance Antony -- View this message in

[R] Moving a file from one location to another

2012-10-17 Thread Rantony
Hi ,A simple question, How we can move a file from one location to another ? (i mean cut & paste)Can any one help fast please ?Thanks in advance- Antony -- View this message in context: http://r.789695.n4.nabble.com/Moving-a-file-from-one-location-to-another-tp4646437.html Sent from the R help

[R] R-SCRIPT Label Calling Method

2012-06-12 Thread Rantony
Hi, here i have some code... a <-1 b <- b+1 c <- b+a/20 if c >5 { d<- 1 } else { d<- 0 } i want to repeat this code from the 2nd line [b <- b+1] without using loop. Actulay i want to use "*Label *" and call *GoTo* method like in other coding Languages. For eg:- like this,

[R] Time difference between two dates/timing

2012-06-14 Thread Rantony
Hi, Here, i have a matrix like this MyMatrix <- *DATETIMEHEADER1HEADER2* 1/1/2010 0:10 197.1947 100.0859 1/1/2010 0:20 203.8811 100.1013 1/1/2010 0:30 206.564 100.0433 1/1/2010 0:40 207.9563

[R] Decrete value check in a matrix

2012-07-02 Thread Rantony
Hi All, Here i have an Dataframe (or) Matrix like this, MyMatrix <- ABC XYZ ----- 1 2.5 3.4 4 5 6 5.6 6.7 Here i need to check each column value having decrete value or not ?. If that particular coulmn-value having decrete val

Re: [R] Decrete value check in a matrix

2012-07-02 Thread Rantony
Good. Its working fine. Thank you John ! From: John Kane [via R] [mailto:ml-node+s789695n4635113...@n4.nabble.com] Sent: Monday, July 02, 2012 6:18 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Decrete value check in a matrix You are not asking for a Decrete [sic] (descrete) va

[R] Use of Sappy and Tappy for Mathematical Calculation

2012-07-10 Thread Rantony
Hi, i have a matrix like this, ABCXYZ... . - -- 1220 ... . 2435 ... . 3040 ... . Here, i need to get Sum of each colu

[R] Count of elements in coulmns of a matrix

2012-07-10 Thread Rantony
Could you please tell me what is the function or method to get count of elements in all the columns in a matrix ? for eg :- ABC XYZPQR -- - -- 234 4 5 54 3 2 Result will be like ABC

[R] MODE , VARIANCE , NTH PERCENTAILE

2012-07-11 Thread Rantony
Hi, Here i have an matrix like this, ABCPQRXYZ MNO -- --- -- 367 15 2 122415 20 5 1 2 25 50 15 35 i need to get the "MO

Re: [R] MODE , VARIANCE , NTH PERCENTAILE

2012-07-11 Thread Rantony
your matrix into a data frame using as.data.frame and then > rantony ABC PQR XYZ MNO [1,] 3 6 7 15 [2,] 2 12 24 15 [3,] 20 5 1 2 [4,] 25 50 15 35 > rantony=as.data.frame(rantony) > sapply(rantony,var) #calculates column wise variance ABC

[R] Add row into a Matrix witout headers from Function

2012-07-12 Thread Rantony
Hi, Here i have a matrix like this, OLDMatrix <- X1 X2X3 - ---- 22 24 23 25 27 27 10 13 15 the thing is, im running two function(SUM,COUNT) to get output in another matrix called NEWMatrix NEWMatrix <- c("SUM

Re: [R] MODE , VARIANCE , NTH PERCENTAILE

2012-07-12 Thread Rantony
: MODE , VARIANCE , NTH PERCENTAILE On 07/11/2012 05:38 PM, Rantony wrote: > Hi, > Here i have an matrix like this, > > ABCPQRXYZ MNO > -- --- -- > 367 15 > 2 122415 >

Re: [R] Add row into a Matrix witout headers from Function

2012-07-12 Thread Rantony
- rbind(colSums(OLDMatrix ), colSums(!is.na(OLDMatrix ))) dimnames(NEWMatrix) <- list(c("SUM", "COUNT"), NULL) OLDMatrix X1 X2 X3 [1,] 22 24 23 [2,] 25 27 27 [3,] 10 13 15 NEWMatrix [,1] [,2] [,3] SUM 57 64 65 COUNT333 Jean Ranton

[R] Column create and Update using function

2012-07-13 Thread Rantony
Hi, here i have a Max and Min values Min <-3 Max <-6 and also a matrix like this, ABCXYZ PQR -- ------ 2 43 5 48 7 13 In this i need to check each particular

Re: [R] Column create and Update using function

2012-07-16 Thread Rantony
3 4 1 RC RC RCRC 4 3 2 4 3 2 5 4 6 5 7 4RCRC ## A.K. - Original Message - From: Rantony <[hidden email]> To: [hidd

Re: [R] Column create and Update using function

2012-07-16 Thread Rantony
F",sep="_") mydat3<-data.frame(cbind(mydat1,mydat2)) mydat3 ABC XYZ ABC_QF XYZ_QF 1 4 6RC 2 7 3 RC A.K. - Original Message - From: Rantony <[hidden email]> To: [hidden email] Cc: Sent: Monday, July

[R] NTH PERCENTILE COULMNWIESE

2012-07-18 Thread Rantony
Hi, Here i have an matrix mydat <- ABCXYZ - -- 12 6 6 50 90 100 55 85 100 25 i need to find the " NTH percentile " [result should be in column-wise]. here i have a code for NTH percenile, For eg:- if i need 20th-percentile then, qu

[R] ERROR : cannot allocate vector of size (in MB & GB)

2012-07-24 Thread Rantony
Hi, Here in R, I need to load a huge file(.csv) , its size is 200MB. [may come more than 1GB sometimes]. When i tried to load into a variable it taking too much of time and after that when i do cbind by groups, getting an error like this " Error: cannot allocate vector of size 82.4 Mb " My requi

[R] Remove a complete row as per the Range in a Matrix

2012-07-31 Thread Rantony
Hi, Here i have a Matrix MyMatrix <- NameAge - --- ANTONY27 IMRAN 30 RAJ 22 NAHAS 32 GEO 42 and here i have an array with Minimum and Maximum values. MinMaxArray <- data.frame(MIN = 25,MAX=35) MIN

Re: [R] ERROR : cannot allocate vector of size (in MB & GB)

2012-08-08 Thread Rantony
Hi Arun, But I am using Windows(XP). From: arun kirshna [via R] [mailto:ml-node+s789695n4639435...@n4.nabble.com] Sent: Tuesday, August 07, 2012 10:49 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: ERROR : cannot allocate vector of size (in MB & GB) HI, If you are using linux

[R] Split CSV as per file size

2012-08-10 Thread Rantony
Hi here i have a code to split a csv file as per group of line. The code given below, SplitCSVByLine <- function(DataMatrix,Destination,NoOfLineToGroup) { input <- file(DataMatrix, "r") fileNo <- 1 repeat { myLines

[R] Get the filename from the given path

2012-08-17 Thread Rantony
Hi, Here i have a file path, for eg : - FPath <- "D:\\MyFolder\\MyFile.txt" HOW IS POSSIBLE TO GET THE FILE NAME FROM THIS GIVEN PATH ? - thanks in advance Antony. -- View this message in context: http://r.789695.n4.nabble.com/Get-the-filename-from-the-given-path-tp4640578.html Sent from t

Re: [R] Get the filename from the given path

2012-08-17 Thread Rantony
Thanks pramod. From: Pramod [via R] [mailto:ml-node+s789695n4640600...@n4.nabble.com] Sent: Friday, August 17, 2012 5:24 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Get the filename from the given path x <- substr(FPath,13,nchar(FPath)) should give you the desired output.

[R] String Handling() for Split a word by a letter

2012-08-27 Thread Rantony
Hi, here im unable to run a string handle function called unpaste(). for eg:- a<- "12345_mydata" Actually my requirement what is i need to get , only 12345. Means that , i need the all letter as a word which is before of first " _ " - symbol of "a". i tried to do with unpaste, it says functio

[R] Create and Assign value into a variable from Another variable

2012-08-28 Thread Rantony
Hi, Here i have a variable named "MyVariable" containing particular name For eg:- MyVariable <- "UnitNo" Here my requirement is, i need to get "UnitNo" as another variable by reading "MyVariable" i need "UnitNo" as variable name and need to assign some value into that. i had tried with as.n

Re: [R] String Handling() for Split a word by a letter

2012-08-28 Thread Rantony
tuck ! - Thanks Antony From: jholtman [via R] [mailto:ml-node+s789695n4641417...@n4.nabble.com] Sent: Monday, August 27, 2012 7:56 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: String Handling() for Split a word by a letter Is this what you want: > a<- &q

Re: [R] Split CSV as per file size

2012-08-28 Thread Rantony
But here, I need to split the csv file by giving file-size(in KB) as input. It required to split as per size(in KB), instead of giving no. of files. Suppose, even if the file size ends in the middle of the last line, it should include the complete last line. For eg: NAME AGE PLACE A

[R] Unzip files from the given path to the destination path

2012-08-28 Thread Rantony
Hi, Any idea to - Unzip files from a given path and sub-folders to the destination path ? - Thanks Antony. -- View this message in context: http://r.789695.n4.nabble.com/Unzip-files-from-the-given-path-to-the-destination-path-tp4641549.html Sent from the R help mailing list archive at Nabb

Re: [R] Get variable data Reading from the list

2012-08-28 Thread Rantony
Yes. Thank you. This is what I wanted. Thanks ! From: jeff6868 [via R] [mailto:ml-node+s789695n4641563...@n4.nabble.com] Sent: Tuesday, August 28, 2012 7:03 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Get variable data Reading from the list Hello, And this: get(MyList[[1]]) w

Re: [R] Get variable data Reading from the list

2012-08-28 Thread Rantony
Thank you. From: arun kirshna [via R] [mailto:ml-node+s789695n4641565...@n4.nabble.com] Sent: Tuesday, August 28, 2012 7:25 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Get variable data Reading from the list Hi, MyList<-list() MyList[["MyVar"]]<-c(1:10) MyList[[1]] # [1]

[R] Get variable data Reading from the list

2012-08-28 Thread Rantony
Here i have a variable MyVar <- data.frame(read.csv("D:\\Doc.csv")) And now i am storing this variable name into a list. MyList <- list() MyList [length(MyList )+1]<- "MyVar" Now what is the requirement is, i need to call the variable name "MyVar" from the list "MyList " and get the data. ---

[R] Month Difference

2012-09-07 Thread Rantony
Hi, i need a small help. a<- as.Date("2012-01-01") b<- as.Date("2012-12-01") My requirement what is, i need to get the month difference of these two dates. Can any one help me please ! - Antony -- View this message in context: http://r.789695.n4.nabble.c

[R] Hash Table - Select and Change Data iniside Matrix

2012-05-25 Thread Rantony
Hi, Here i have been a matrix like this, *NAMEAGE PALCETRUE/FALSE* ABC 20 INDIA XYZ 30 FRANCE PQR40 USA MNO 30KENIYA DEF25AUSTRALIA Here,* TRUE/FALSE* Column containing empty values. So my requir

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-25 Thread Rantony
lt;- TRUE Next time do use dput() to give a reproducible example of your data -- if it's very large, just limit it to the first 30 rows or so with dput(head(dats, 30)) Michael On Fri, May 25, 2012 at 9:43 AM, Rantony <[hidden email]> wrote: > Hi, > > Here

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-28 Thread Rantony
data.frame, dat[dat$AGE == 30,"TRUE/FALSE"] <- TRUE Next time do use dput() to give a reproducible example of your data -- if it's very large, just limit it to the first 30 rows or so with dput(head(dats, 30)) Michael On Fri, May 25, 2012 at 9:43 AM, Rantony <[hidden em

[R] Hash Table - Select and Change Data iniside Matrix Using "Between"

2012-05-28 Thread Rantony
Hi, Here i have been an matrix like this, *NAMEAGE PALCETRUE/FALSE* ABC 20 INDIA XYZ 30 FRANCE PQR40 USA MNO 30KENIYA DEF25AUSTRALIA GTY34 CANADA BNH 38JAPAN Here, *TRUE/F

[R] Use variable inside Function for updating the matrix

2012-05-29 Thread Rantony
Hi, Here i have a data frame like this, frame name is "dat" *NAME AGE ELIGIBLE* A 20 B 14 C 35 D 10 E 50 In this, i want to change the column '*ELIGIBLE*' status to '*YES

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-29 Thread Rantony
eans: E.g., between 5 and 25 with(dat, (AGE < 25) & (AGE > 5)) and so on. Michael On Mon, May 28, 2012 at 9:34 AM, Rantony <[hidden email]> wrote: > Hi Michel, > > > > More than equal to function, how can I use other function ?, > > For example :-

Re: [R] Use variable inside Function for updating the matrix

2012-05-29 Thread Rantony
t;YES", " ") "OR" - How it is possible ? From: Uwe Ligges-3 [via R] [mailto:ml-node+s789695n4631665...@n4.nabble.com] Sent: Tuesday, May 29, 2012 2:21 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Use variable inside Function for updating the matrix On 29.

[R] Matrix Header Name Select

2012-05-29 Thread Rantony
Hi, i have a matrix with headers. How can i get header name in that marix ? i tried in R, with names(MyMatrix[1]) - its getting exactly. But when i try in eclips, its not receiving ColHdr <- names(MyMatrix[1]) - it getting NULL value - could you please help me ? - Thanks Antony. -- View this

[R] Error ! "Subscript out of bounds"

2012-05-29 Thread Rantony
Hi, i have a function like this, *GetCsv[GetCsv[,ColHdr]ArrMinMax[iCol,2],ColHdr_QF]<-"RC"* Here, *GetCsv* -- It contain a matrix *ColHdr* -- Is a column Header *ArrMinMax* - It is a array of 2 columns - Here, this is the function to change

Re: [R] Matrix Header Name Select

2012-05-29 Thread Rantony
ITS OK. And thanks. Its working ! From: Özgür Asar [via R] [mailto:ml-node+s789695n4631684...@n4.nabble.com] Sent: Tuesday, May 29, 2012 6:04 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Matrix Header Name Select Sorry, I misunderstood your question. colnames(mymatrix) woul

[R] Create and Change Column in a Matrix as per condition

2012-05-29 Thread Rantony
Hi, i have a matrix like this *DWATT * 10 20 30 30 32 Here i need to create a new column named "*DWATT_QF*" with filling value as per the following condition, if DWATT_QF = RC When DWATT value less than 30

[R] Separate Array Variable Content

2012-05-30 Thread Rantony
Hi, I am new in R, i have a matrix like this MyMatrix <- *ABC PQRXYZ* 10 2030 40 5060 70 8090 And, i have an array containing some conditions like this, MyArray <- c("*ABC*>50","*PQR*<50","*ABC*<30 &* XYZ*<40") "ABC>50" "PQR<50" "ABC<30 & XYZ<4