similar to: merge strings

Displaying 20 results from an estimated 80000 matches similar to: "merge strings"

2008 Sep 25
6
Conversion to Binary (base2)
Hello, Is there a simple way to take an input, and convert the decimal integers to binary? In this case, I have a CSV file, and I need to convert the first column of every line to binary. Thanks. -- Jason Thibodeau [[alternative HTML version deleted]]
2006 Sep 17
1
using "table" in R
Hi there, I have a dataframe whose elements are numbers or characters. I want to extract the frequencies of each elements in the dataframe. For example, d = as.data.frame(matrix(c(1, 2, 3, 3), 2,2)) What I want is first what are the elements in the data (1,2,3 here) and second what are their frequencies (1,1,2 respectively). How to use "table" to extract these two pieces of
2010 Jun 15
2
Fastest way to merge matrix columns into a comma delimited string?
Folks: Say I have a matrix: test=matrix(c(1,2,3),nrow=10,ncol=3) I would like to have an output character vector where each line is row's values delimited by commas, e.g.: "1,2,3" "2,3,1" "3,1,2" ... "1,2,3" What is the fastest way of doing this? I can paste() row-by-row but this seems an inefficient approach to doing this. Thanks! I'm not
2013 Apr 23
2
Tables package - remove NAs and NaN
Dear Rxperts, q <- data.frame(p=rep(c("A","B"),each=10,len=30), a=rep(c(1,2,3),each=10),id=seq(30), b=round(runif(30,10,20)), c=round(runif(30,40,70))) The operation below... tabular(((p=factor(p))*(a=factor(a))+1) ~ (N = 1) + (b + c)* (mean+sd),data=q) yields some rows of NAs and NaN as shown below b c p a N mean sd mean sd A 1 10
2011 Feb 25
6
preventing repeat in "paste"
Hello! s<-"start"; e<-"end" middle<-as.character(c(1,2,3)) I would like to get the following result: "start 123 end" or "start 1 2 3 end" or "start 1,2,3 end" How can I avoide this (undesired) result: paste(s,middle,e,sep=" ") Thank you! -- Dimitri Liakhovitski Ninah Consulting www.ninah.com
2006 May 10
3
integer vector to a string
hi there is there a way that i can coerce a vector of integers to ONE string with the numbers comma separated like: 1:500 -> "1,2,3, ..., 500" i've tried deparse, but it divides the result into a vector of string (depending on the setting of width with a max of 500) regards soren
2004 Dec 01
3
Hexidecimal conversion
Help I can produce the hexidecimal equivalent of a decimal number but I am having a hard time reversing the operation. I'm good for hex representations to 159 and am close to extending to 2559. The archives are not clear on the existence of a function for this task. Is there one? Here is what I have got so far: #Good for hex values to "9F" as.decmode<-function(as.character(x)){
2007 Feb 11
3
merge words=data name
I would like to merge two parts of words to get a name of the data. First M3$N (invariable) and second is a number from 0001 to 3003 - M3$N0001,M3$N0002,...,M3$N3003. For example if I do it like this: my.data <- paste("M3$N",2456,sep="") I get > my.data [1] "M3$N2456" But I want to get something equivalent to my.data<- M3$N2456 Is there any way to do it?
2010 Feb 25
6
Building R packages in Windows 7
Dear useRs, I'm having trouble building R packages in Windows 7 regarding HTML help Workshop. Pointing PATH to c:\Program Files\HTML help Workshop does work in Windows (e.g. Vista) and does not in Windows 7. Some tips?? Kind regards, -- Dr Eric B Ferreira Exact Sciences Department Federal University of Alfenas Brazil [[alternative HTML version deleted]]
2008 Sep 21
1
How to plot "greater than" symbol on the x-axis
Hello everyone, I want to plot a "greater than" symbol (the "_" under ">") on the x-axis in the labels. Is it possible to do it? Thanks. Bingshan [[alternative HTML version deleted]]
2012 Jun 15
2
strings concatenation and organization (fast)
Hello, What is the fastest way to do this? I has to be done quite a few times. Basically I have sets of 3 numbers (as characters) and sets of 3 dashes and I have to store them in named columns. The order of the sets and the column name they fall under is important. The actual numbers and the pattern/order of the sets should be considered random/unpredictable. Sample data: vec =
2007 May 09
1
power 2x3 exact test
Hi, all, I am wondering if there is an algorithm for calculating power of 2x3 table using Fisher exact test. There is one (algorithm 280) for 2x2 Fisher exact test but I couldn't find one for 2x3 table. If we are not lucky enough to have one, is there any other way to calculate exact power of 2x3 table? The reason why I want exact power is because some cells are assumed to be very
2007 Feb 22
2
rgl update: please test!
(This is bcc'd to a list of people who have had problems with rgl lately or who are known to be big users; not cc'd, so you don't all get cc'd all the responses on the R-devel list). I've just put together a test build of rgl, and put it on my web site as http://www.stats.uwo.ca/faculty/murdoch/software/rgl_0.70.564.tar.gz (source) and
2007 Nov 19
2
Using windows() and jpeg()
Hello, I have the following question, which I haven't been able to resolve after days of trying. I used to save my plots as jpegs using the savePlot command. However, that seems to result in lost resolution. So now I'm trying to use the jpeg( ) function, but am having trouble because it seems to be incompatible with the windows (width=, height=) command. It's important for me to
2005 Dec 09
4
ID for machine?
Does R have a function to obtain a name of the machine that it is running on? I'm going to be writing results to a database from several different machines, and I'd like to be able to identify where they came from. Duncan Murdoch
2008 Dec 02
1
merge character strings
Hi, how can I do the following in R?: vec <- c("a", "b", "c") ....magic..... print(str) "abc" or even better: "(a,b,c)"? Cheers -- View this message in context: http://www.nabble.com/merge-character-strings-tp20790116p20790116.html Sent from the R help mailing list archive at Nabble.com.
2007 Jun 28
2
logistic regression and dummy variable coding
Hello everyone, I have a variable with several categories and I want to convert this into dummy variables and do logistic regression on it. I used model.matrix to create dummy variables but it always picked the smallest one as the reference. For example, model.matrix(~.,data=as.data.frame(letters[1:5])) will code 'a' as '0 0 0 0'. But I want to code another category as
2009 Sep 19
4
Processing strings
Hi, I am unable to do something fairly simple. I have matrices called Table1,..., Table10. I want to be able to print them using a loop. So I wrote: ################## for (i in 1:10){ disp<-paste("Table", i, sep="") eval(parse(text=disp)) } ################## but this produces no output. Any ideas?
2006 Jun 21
5
rank(x,y)?
Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x, with ties broken by y. I'd like instead to calculate the rank of each pair under the same ordering, but the rank() function doesn't take multiple values as input. Is there a simple way to get what I want? E.g. > x <- c(1,2,3,4,1,2,3,4) > y <-
2006 Oct 05
1
Bug in 2.4.0 Windows menu setup (PR#9277)
I've tracked down where this is occurring, but I don't know how to fix it. Here's a summary: If the language in Windows is set to simplified Chinese (i.e. Chinese (PRC)) and message translations are installed, then on startup Rgui crashes when it tries to install the console popup menu. The crash comes when it gets an error trying to do a conversion using mbrtowc, and tries to