similar to: how to avoid writing index in write.table command

Displaying 20 results from an estimated 10000 matches similar to: "how to avoid writing index in write.table command"

2012 Mar 07
2
how to see inbuilt function(cor.test) & how to get p-value from t-value(test of significance) ?
i can see source code of function > cor function (x, y = NULL, use = "everything", method = c("pearson", "kendall", "spearman")) { na.method <- pmatch(use, c("all.obs", "complete.obs", "pairwise.complete.obs", "everything", "na.or.complete"))
2012 Apr 22
2
how to avoid newlines & tabs in file opening?
i have uploaded file,but when i am opening it in R,using > u<-file(file.choose(),"r") >k<-readLines(u) >k > k[1:120] is has all /t (tabs)& newlines, how to avoid it, can i take first 3 columns only in table form (lines starts with # not important for me) uploaded file:- http://r.789695.n4.nabble.com/file/n4577757/rabata.txt rabata.txt -- View this message in
2011 Jul 01
4
Access only part of last dimension of table/matrix
I would like to do some operations inside a function using only one value for the last dimension of a table/matrix: tabfn <- function (dfrm, facvec, YN ="event"){ return( Etbl <- do.call(table, dfrm[ , c(facvec, "event") ]) ) # just want Etbl[,,,"TRUE"] or Etbl[,, "TRUE"] or Etbl[,"TRUE"] }
2011 May 16
2
conditional rowsums in sapply
Hi all I have a data frame with duplicate columns and i want to remove duplicates by adding rows in each group of duplicates, but have lots of NA's. Data: dfrm <- data.frame(a = 1:4, b= 1:4, cc= 1:4, dd=1:10, ee=1:4) names(dfrm) <- c("a", "a", "b", "b", "b") dfrm[3,2:3]<-NA dfrm a a b b b 1 1 1 1 1 1 2 2 2 2 2 2 3
2012 Aug 11
3
Align columns in data frame write.table
Does anyone know of a way to specify the alignment of individual columns in a data frame so that after using write.table the columns are aligned in the file? -- View this message in context: http://r.789695.n4.nabble.com/Align-columns-in-data-frame-write-table-tp4640007.html Sent from the R help mailing list archive at Nabble.com.
2012 Feb 04
2
want to drop levels of table vector & join two vector(appending)
is have vector from table stored in s variable > s [1] R P Y A C P V E S C D R R F S R S A D L T R H I R I Levels: A C D E F G H I K L M N P Q R S T V Y -- View this message in context: http://r.789695.n4.nabble.com/want-to-drop-levels-of-table-vector-join-two-vector-appending-tp4356851p4356851.html Sent from the R help mailing list archive at Nabble.com.
2012 Feb 28
2
how to append element at last position in array dynamically
> h<-array() > h [1] NA > append(h,9) [1] NA 9 but what it append......... > h [1] NA -- View this message in context: http://r.789695.n4.nabble.com/how-to-append-element-at-last-position-in-array-dynamically-tp4427893p4427893.html Sent from the R help mailing list archive at Nabble.com.
2011 Jan 31
2
From data frame to list object
Dear all, let say I have following data frame: > data.frame(x=rnorm(18), y=rep(c("a", "b", "c"), each=6)) x y 1 -1.072152537 a 2 0.382985265 a 3 0.058877377 a 4 -0.006911939 a 5 -2.355269051 a 6 -0.303095553 a 7 0.484038422 b 8 0.733928931 b 9 -1.136014346 b 10 0.503552090 b 11 1.708609658 b 12 -0.294599403 b 13
2012 Mar 31
2
Is it there any std pattern in R which show same representation style of ppt found on net
i m searching on net,material related to R, whenever i get ppt presentation of some topic ,i found it in speical format white backgroud & blue bars,having links for further topics see link 1) https://www.rmetrics.org/files/Meielisalp2007/Presentations/Pfaff.pdf 2)http://grapevine.com.au/~yanchang/docs/Time-Series-Mining-slides.pdf If this is format,how can i made it,if i want to give my R
2012 May 26
6
how to check given number seq. is time series or not?
i have following numbers 0.889046409368551 1.22726162946495 1.22726162946495 1.35785109728356 1.35785109728356 1.10704609982913 1.4424189950435 1.2277843378837 1.35785109728356 0.970883941918588 0.822170913920467 1.35785109728356 0.358815782262543 0.774234247460432 0.822170913920467 0.822170913920467 0.72599976881814 0.671583894425946
2011 Jan 31
2
Missing at random
R users: Thanks in advance  How to generate missing at random (MAR)? assaedi76@yahoo.com Thanks [[alternative HTML version deleted]]
2013 Mar 06
2
Fwd: How to conditionally remove dataframe rows?
Hi, I have a data frame with two columns. I need to remove duplicated rows in first column, but I need to do it conditionally to values of the second column. Example: Point_counts Psi_Sp 1 A 0 2 A 1 3 B 1 4 B 2 5 B 0
2012 Apr 21
1
how to write html output (webscraped using RCurl package) into file?
i want "http://scop.berkeley.edu/astral/pdbstyle/?id=d1fjgc2&output=html",showing information in webpage to be written in .txt file as it is(i don't want any html tag) i am using "RCurl" package >marathi<-htmlTreeParse("http://scop.berkeley.edu/astral/pdbstyle/?id=d1fjgc2&output=html") >marathi
2011 Jul 15
3
summarized data set - how to use an "occurs" field
I have a data set with 22 fields and several thousand records in which one field (count) indicates the number of times that each specific combination of the other 21 fields occurred in a bigger and largely unavailable data set. So each record is unique in its combination of field values and has a field that identifies how many multiples of this record actually occurred. Without resorting to
2012 Mar 18
3
Extracting numbers from a character variable of different types
Hello, I have a file which contains a column with age, which is represented in the two following patterns 1. "007/A" or ''007/a" or ''7 /a" ..... In this case A or a means year and I would like to extract only the numeric values eg 7 in the above case if this pattern exits in a line of file. 2. "004/M" or "004/m" where M or m means month
2012 Mar 15
2
how to bind uneven column (not equal length) into matrix without recycling values
i have > x [1] 1 2 3 4 5 6 > y [1] 34 5 6 > z<-cbind(x,y) > z x y [1,] 1 34 [2,] 2 5 [3,] 3 6 [4,] 4 34 [5,] 5 5 [6,] 6 6 i don't want recycling, instead can we put NA /0 like below> z x y [1,] 1 34 [2,] 2 5 [3,] 3 6 [4,] 4 NA [5,] 5 NA [6,] 6 NA & want distance matrix -- View this message in context:
2013 Mar 11
2
how to convert a data.frame to tree structure object such as dendrogram
I have a data.frame object like: > data.frame(x=c('A','A','B','B'), y=c('Ab','Ac','Ba','Bd')) x y 1 A Ab 2 A Ac 3 B Ba 4 B Bd how could I create a tree structure object like this: |---Ab A---| _| |---Ac | | |---Ba B---| |---Bb Thanks, Zech [[alternative HTML version deleted]]
2011 Mar 12
2
Merge data under conditions
Dear All, Debuting in R, I'm facing a problem. I have 2 vectors, say 'a' et 'b', and I'd like to merge them according to the proximity of their variable 'time'. How to do to keep elements which satisfy (for example) 'a$time-b$time<0.5'? For example : > a time x 1 1.0 4 2 2.2 5 3 5.2 6 > b time y 1 0 1 2 1 3 3 2 5 4 4 7 5
2010 Mar 16
2
Conditional variable assignment
Hi everyone, Once again I am stuck with a problem I can't seem to figure out. I suppose this learning curve levels off eventually, lol. I am learning on my own with absolutely no background in programming, so if I seem to request help a lot it's not because I am seeking others to do the work for me. I need to assign one of two arrival times to the 'ARRIVE' variable of my
2003 May 09
1
windows data editor changes dimensions displayed data frames
dear R-tists, i am experiencing a problem with the data editor in the windows version of R 1.6.1 envoked with the command 'fix'. the data editor changes the size of large data frames. a simple example illustrates this: ------------------------------------------------------- > dfrm <- data.frame(no=c(1:100000)) > length(dfrm[,1]) [1] 100000 > fix(dfrm) >