similar to: concatenating multiple columns from files

Displaying 20 results from an estimated 11000 matches similar to: "concatenating multiple columns from files"

2011 May 17
1
simprof test using jaccard distance
Dear All, I would like to use the simprof function (clustsig package) but the available distances do not include Jaccard distance, which is the most appropriate for pres/abs community data. Here is the core of the function: > simprof function (data, num.expected = 1000, num.simulated = 999, method.cluster = "average", method.distance = "euclidean", method.transform =
2012 Sep 14
4
concatenating two vectors
Dear all, I want to concatenate the elements of two vectors such as a<-c("a1","a2") b<-c("b1","b2") and obtain "a1b1", "a1b2","a2b1","a2b2" I tried the paste and paste0 functions, but they yielded elementwise concatenation such as "a1b1","a2b2" I am wondering that is there an efficient
2002 Dec 18
6
Can I build an array of regrssion model?
Hi, I am trying to use piecewise linear regression to approximate a nonlinear function. Actually, I don't know how many linear functions I need, therefore, I want build an array of regression models to automate the approximation job. Could you please give me any clue? Attached is ongoing code: rawData = scan("c:/zyang/mass/data/A01/1.PRN", what=list(numeric(),numeric())); len =
2012 Dec 10
1
Can somebody suggest how to achieve following data manipulation?
Dear all, Let say I have following data: RawData <- matrix(1:101, nr = 1); colnames(RawData) <- c("ASD", as.character(as.yearmon(seq(as.Date("2012-03-01"), length.out = 100, by = "1 month")))); rownames(RawData) <- "XYZ" CutOffDate <- as.Date("2012-09-01") NewDateSeries <- as.character(as.yearmon(seq(CutOffDate, to =
2009 Feb 02
2
concatenating 2 text columns in a data.frame
Hi, I'm trying to concatenate values from two columns in a data frame. For example, I have the following data.frame: C1 C2 C3 C4 C5 A B *F C* Q G H *I J* T K D *R S* E P L *M N* O I'd like to concatenate text from columns C3 and C4, to yield either a list or vector, like so: NewCol FC IJ RS MN Is this feasible in R? Thanks!
2008 Mar 23
1
mapply
In an earlier post, a person wanted to divide each of the rows of rawdata by the row vector sens so he did below but didn't like it and asked if there was a better solution. rawdata <- data.frame(rbind(c(1,2,2), c(4,5,6))) sens <- c(2,4,6) temp <- t(rawdata)/sens temp <- t(temp) print(temp) Gabor sent three other solutions and I understood 2 of them but not the
2005 Aug 04
2
Avoiding for loop
I understand that in R, for loops are not used as often as other languages, and am trying to learn how to avoid them. I am wondering if there is a more efficient way to write a certain piece of code, which right now I can only envision as a for loop. I have a data file that basically looks like: 1,55 1,23 2,12 ... that defines a matrix. Each row of the data file corresponds to a row of the
2006 Jul 12
4
Keep value lables with data frame manipulation
Dear R, I import data from spss into a R data.frame. On this rawdata I do some data processing (selection of observations, normalization, recoding of variables etc..). The result is stored in a new data.frame, however, in this new data.frame the value labels are lost. Example of what I do in code: # read raw data from spss rawdata <- read.spss("./data/T50937.SAV",
2009 Jul 14
2
How to provide list as an argument for the data.frame()
Hi R -users, i've a table as describe below. I'm reading the numeric value presented in this table to populate a list. #table #============ #X    A    B    C #x1    2    3    4 #x2    5    7    10 #x4    2    3    5 #============ rawData <- read.table("raw_data.txt",header=T, sep="\t") myList=list() counter=0 for (i in c(1:length(rawData$X))) {     print (i)    
2012 Aug 23
3
Concatenating data frames in R versus SAS
I am trying to concatenate 2 datasets that don't have exactly the same column. In SAS I did: data summary; set agency prop; run; No problem in R I get error message summary <-rbind(agency,prop) Error in match.names(clabs, names(xi)) : names do not match previous names But when I use rbin.fill, that overwrites the second file w/ first one. Is there a way to replicate the sas process
2012 Jan 20
2
rbind()
Hello there, Much thanks in advance for any help. I have a few questions: 1) Why do I keep getting the following error: File1 <- read.csv("../RawData/File1.csv",as.is=TRUE,row.names=1) Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file '../RawData/File1.csv': No such file or
2011 Sep 08
2
pie chart
Hi All, I have txt file like : $ cat data.txt US 10 UK 12 Ind 4 Germany 14 France 8 > rawdata <- read.table(file='data.txt',sep='\t' , header=FALSE) > rawdata V1 V2 1 US 10 2 UK 12 3 Ind 4 4 Germany 14 5 France 8 I want to draw pie chart for the above data. How to split rawdata into : con <-
2009 Aug 03
2
Scale set of 0 values returns NAN??
Hi, More questions in my ongoing quest to convert from RapidMiner to R. One thing has become VERY CLEAR: None of the issues I'm asking about here are addressed in RapidMiner. How it handles misisng values, scaling, etc. is hidden within the "black box". Using R is forcing me to take a much deeper look at my data and how my experiments are constructed. (That's a very
2009 Sep 28
1
help with lda function
I am having a problem understanding the lda package. I have a dataset here: [,1] [,2] [,3] [1,] 2.95 6.63 0 [2,] 2.53 7.79 0 [3,] 3.57 5.65 0 [4,] 3.16 5.47 0 [5,] 2.58 4.46 1 [6,] 2.16 6.22 1 [7,] 3.27 3.52 1 If I do the following; "names(d)<-c("y","x1","x2") d$x1 = d$x1 * 100 d$x2 = d$x2 * 100 g<-lda( y ~ x1 + x2, data=d) v2
2004 Oct 18
2
concatenating lists elementwise
Hi How do I concatenate two lists element-by-element? Example: list.1 <- list(temperature=c("hot","cold") , size=c("big","medium")) list.2 <- list(temperature=c("lukewarm") , size=c("massive","tiny")) list.wanted <- list(temperature=c("hot","cold","lukewarm") ,
2012 Jun 28
1
Merging listed dataset into one
Hello, I'm wondering how I can merge two featuresets into one. My dataset is two sets of microarray data and it looks like followings: > rawData $v1 TilingFeatureSet (storageMode: lockedEnvironment) assayData: 2197815 features, 59 samples element names: channel1, channel2 protocolData rowNames: LT290677RU_D1_2011-02-16 LT286300LU_D1_2010-07-24 ... LT003990RU_D1_2010-11-04 (59
2009 Jun 16
1
adressing dataframes
Hi everyone, I experience some problems with adressing of data.frames when I retrieve some information for geographical position (ypos, xpos) ot of a MySQL Database and want to perform some simple statistics. The problem is adressing the dataframes with a construct like rawdata[c(type)] vs. rawdata$TEMPMIN to retrieve the numerical information and not a string (I want to store the numerical
2007 Jul 03
2
vertically concatenating data frames
Hi, what is the recommended way to vertically concatenate 2 data frames with the same column names but different number of rows? My problem is something along these lines: df1 <- data.frame(var1=var1,var2=var2,var3=var3) # nrow(df1)=1000 df2 <- data.frame(var1=var4,var2=var5,var3=var6) # nrow(df2)=2000 I tried df <- c(df1,df2), no success. stack does not seem to be appropriate
2019 Jan 24
2
Concatenating DWARF location expressions
Hello, Could someone explain to me what the rules are for concatenation of DWARF location expressions? For example in lib/CodeGen/PrologEpilogInserter.cpp there is a call to DIExpression::prepend to concatenate the stack slot address of a variable to an existing expression. Now the problem here is that the former is a 'Memory location description' while the latter could very well be a
2008 Mar 22
2
More elegant multiplication or division of a data frame with a vector
Hello, I am importing some raw voltage multichannel measurements into an R data frame. I need to scale each column with the respective sensitivity for that channel. I figured how to do it, but I am curious if there isn't a more elegant way. Now I start with something like this: rawdata <- data.frame(rbind(c(1,2,3), c(4,5,6))) sens <- c(2,4,6) and I do this: data <-