similar to: Merge question

Displaying 20 results from an estimated 1000 matches similar to: "Merge question"

2009 Nov 05
2
Merge records in the same dataframe
Hi: Suppose that I have a data frame as below x1 x2 x3 ... x10 wk1 wk2 ... Wk208 (these are the column names) For each record, x1, x2, x3 ... x10 are attributes. and wk1, wk2, ..., wk208 are the sales recoreded for this attribute combination. Suppose that now, that I want to do the following 1. Merge the data frame so that I have a new data frame grouped by values of x2 and x3 (for example).
2009 Oct 28
1
Generating sequence of dates
Hello All: I have the following question # instantiate a date current = as.Date("2009/10/25") #generate a sequence of dates in the future future_dates = seq(current,by='1 week',length=53) Question: How to generate a sequence of past dates starting one week in the past relative to the current date. Obviously, what I wrote below is not correct. I think I can write a for loop and
2009 Nov 05
1
How to read numeric as text
Hi: If I want to read a file with read.table. I want x1 and x2 to be read as character and x3 as numeric. How to do this? Thanks. Satish x1 ,x2,x3 10,20,30 11 ,22,35
2010 Jan 27
1
Installing R and modules on Unix OS
Hi: I have a question about installing R (and modules) on a Unix system (AIX). Can I just gunzip (or the equivalent) the installation files into my home directory or will I need someone with root access to install R? I am hoping that the answer is the former (I can unzip all files to a directory R that I create under my home directory and I can start using it). Could you please help me with this
2009 Nov 12
2
redundant factor levels after subsetting a dataset
#I have a data frame with a numeric and a character variable. x=c(1,2,3,2,0,2,-1,-2,-4) md=c(rep("Miller",3), rep("Richard",3),rep("Smith",3)) data1=data.frame(x,md) #I subset this data.frame in a way such that one level of the character variable does not appear in the new dataset. data2=data1[x>0,] data3=subset(data1,x>0) #However, when I check the levels
2008 May 14
4
Accessing items in a list of lists
Using R 2.6.2, say I have the following list of lists, "comb": data1 <- list(a = 1, b = 2, c = 3) data2 <- list(a = 4, b = 5, c = 6) data3 <- list(a = 3, b = 6, c = 9) comb <- list(data1 = data1, data2 = data2, data3 = data3) So that all names for the lowest level list are common. How can I most efficiently access all of the sublist items "a" indexed by the outer
2013 Jun 10
4
Combining CSV data
Hello R community, I am trying to combine two CSV files that look like this: File A Row_ID_CR, Data1, Data2, Data3 1, aa, bb, cc 2, dd, ee, ff File B Row_ID_N, Src_Row_ID, DataN1 1a, 1, This is comment 1 2a, 1, This is comment 2 3a,
2005 Feb 16
5
scaling axes when plotting multiple data sets
1) When adding additional data sets to a plot using "plot" followed by "lines", is there a way to automate the scaling of the axes to allow for all data sets to fit within the plot area? 2) I attempted to solve this by setting xlim=c(min(c(data1,data2,data3)),max(c(data1,data2,data3))) however, there are some NAs and Infs in these data sets, and min(data1) and max(data1) both
2019 Mar 28
2
NFSv4: Using fsid=0 but *not* exporting the root filesystem
Hi, I would like to use the NFSv4 ability to create a "root" filesystem with fsid=0, so that I don't have to refer to the whole path of the exported filesystem when I mount it. However I do *not* want this root filesystem to be mountable by any host. Is that possible and how? E.g Filesystem: /exports/data1 /exports/data2 /exports/data3 /etc/exports: /exports
2012 Oct 03
2
Creating tiff with 1200 dpi
Hi all, I am trying to create images in R suitable for journal publication. I'd like to make an image that is 3.6" wide and 5.08" length, and 1200 dpi. When I create a tiff file that is 800 dpi and 4x4", it works (although doesn't look good). But when I create a tiff that is the size and dpi I want, it doesn't work. I get the following error: Error in tiff(filename =
2004 Feb 04
5
Date Time Conversion problems...
At one time (version 1.7), the code below used to work for converting and extracting based on the Date Time. In version 1.8.1, something changed I know, but I cannot for the life of me figure out what... Data: UserName,RequestDate,PO,OrderDate,ExpDelivDate,Vendor,Total "Woody, Jim",12/19/2002,AP15063,1/7/2003,2/10/2003,Ames ,8570 "Harrold,
2002 Dec 05
1
Passing options as lists
Hi, I apologize if this has previously been posted. I've just subscribed to the R-help digest. I'm writing a plotting function that uses layout() to plot several different plots on the same device. This function uses plot(), image(), and a custom function that uses text(). Each cell of the layout needs different par() parameters, so what I'd like to do is pass them as lists:
2013 Jan 05
3
Need help with time series data
Dear R users, Could you share your knowledge on following problem: Suppose we have dataframe: ID TIME Data1 Data2 Data3 ........... Data700 1. 2013-01-01 00:00:00 34 53 66 ............ 55 2. 2013-01-01 00:00:01 333 4 5 ............ 50 3. 2013-01-01 00:00:02 and so
2008 Jun 04
4
merging 3 data sets at once
Hi All, I am looking into merging 3 data sets I know how to do that by merging data1 with data2 and then merging the result with data 3. I was wondering if it can be done all at once so I tried, M<-merge(data1,data2,data3, by=?ID?) It does not work! Any ideas? -- View this message in context: http://www.nabble.com/merging-3-data-sets-at-once-tp17658873p17658873.html Sent from the R help
2010 May 28
1
Match 2 vectors
Hi, I have 2 dataframes of unequal length, and I would like to match a factor to them so that both dataframes will have the same number of rows. example: # create the 2 dataframes with unequal length data1 <- data.frame(letters, 1:26)[-c(5,10,19:21),] data2 <- data.frame(letters, 1:26)[-c(6,9,15:18),] data2a <- match(data1[,1], data2[,1]) data2b <- data2[data2a,] When I match
2010 Mar 24
3
How to use the paste function to create an already used variable
Hi there, I have the following problem Four data frames exist: data1 data2 data3 data4 Now I want to write a loop and temporarily store the data1, data2, data3, data4 in a variable called data. I tried the following... for (i in 1:4) { Data <- paste("data",i,sep="") ... .. } but it doesn't function. I think the problem is the definition of the mode of the pasted
2016 Dec 01
2
cannot access to linux share from windows
Hello, I have upgraded a client and a freeipa server from Fedora 24 to 25 recently. And I cannot access linux shares located on the F25 client from a windows desktop. I get these messages: [2016/12/01 11:42:19.218759, 1] ../source3/librpc/crypto/gse_krb5.c:534(fill_mem_keytab_from_dedicated_keytab) ../source3/librpc/crypto/gse_krb5.c:534: smb_krb5_open_keytab failed (Key table name
2002 Jun 27
1
lattice and dates (correcting e-mail formatting glitch - sorry!!)
Hi I'm fairly new to R and the list, so please take what I say accordingly! Far as I can see, strptime gives you a string in some specified format. In order to do any kind of numerically-based modelling with that, you need to obtain a number to work with. One way to do this is by getting the time with Sys.time() instead and coercing it to a number using as.integer(): >
2006 Nov 24
1
barplot help needed
hello, I would like to create the following barplot: I have 4 different data sets (same length + stddev for each data point) data1 sd1 data2 sd2 data3 sd3 data4 sd4 now, I'd like to plot in the following way: data1[1],data2[1],data3[1],data4[1] with it's sd-values side-by-side at one x-axis label (named "position 1") and each bar in different colors.
2017 Mar 15
2
Data structure improvement for the SLP vectorizer
Maybe it would illustrative to give an IR example of the case I'm interested in. Consider define void @"julia_transform_bvn_derivs_hessian!"(double* %data, double* %data2, double *%data3, double *%out) { %element11 = getelementptr inbounds double, double* %data, i32 1 %load10 = load double, double* %data %load11 = load double, double* %element11 %element21 =