similar to: reshape question

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

2009 Aug 25
1
Filling in empty arrays/lists from using "paste" function
Dear R users, I am trying to fill in arrays (5 different according to distinct "id") from objects produced from arbitrary data set below. a <-
2011 Jan 20
4
How to reshape wide format data.frame to long format?
Dear list, I need to convert this data.frame > names(codesM) [1] "key" "AMR.pa1.M" "AMR.pa2.M" "AMR.pa3.M" "AMR.pa4.M" [6] "AMR.pa5.M" "AMR.pa6.M" "AMR.pa7.M" "AMR.pa8.M" "AMR.pa9.M" [11] "AMR.pa10.M" "AMR.ta1.M" "AMR.ta2.M" "AMR.ta3.M"
2011 Jan 31
1
how to search to value to another table
Hello, I'm a new R user. I have two different dummy tables with the variable name tb1 and tb2. tb1< v1 v2 v3 v4 "chr1" 22 23 3 "chr1" 36 37 1 "chr1" 54 55 0 "chr1" 77 78 1 "chr2" 80 81 4 "chr2" 85 86 0 "chr2" 99 100 1
2008 Oct 30
1
tklistbox selection
Hi, I'm posting yet another question about tcltk since I'm still struggling with the package. I'm trying to create a tklistbox and a ttkcombobox on the same parent and am having a problem. Here's an example: library(tcltk) tt <- tktoplevel() tcl1 <- tclVar() tcl2 <- tclVar() tclObj(tcl1) <- letters[1:5] tclObj(tcl2) <- LETTERS[1] tb1 <- tklistbox(tt,
2011 Jan 31
1
Problem with intersection between two different tables
Hi, I'm a beginner with R. I have two different  tables with the variable name dmr1 and tp2 a given following. v1 is the common  column  field of the both tables. In the first table column v3 is always v2+1 while in the second table v2 and v3 hold the range. I want to know which rows of tb1 intersect with the range between v2 and v3 of tb3. I need some one's kind help to solve this
2008 Feb 10
2
reshape
Dear colleagues, I'd like to reshape a datafame in a long format to a wide format, but I do not quite get what I want. Here is an example of the data I've have (dat): sp <- c("a", "a", "a", "a", "b", "b", "b", "c", "d", "d", "d", "d") tr <- c("A",
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2007 Feb 22
1
Cross-tabulations next to each other
I have the following relatively simple problem. Say we have three factors, and we want to create a cross-tabulation against each of the other two: x <- factor(rbinom(5, 1, 1/2)) y <- factor(rbinom(5, 1, 1/2)) z <- factor(rbinom(5, 1, 1/2)) table(x,y) table(x,z) This looks like: y x 0 1 0 2 0 1 1 2 z x 0 1 0 1 1 1 2 1 I would like to get (surely this will
2006 Oct 23
2
getting the by() function to work properly
Hola everyone, Solving this issue would be a huge time saver for analyzing my thesis data, so I'll try to be as concise as possible and hope that someone can give me a hand. I am trying to run a function that I created, which works fine until I try to use it with the by function. That function is listed at the bottom (f3) just in case that might be the issue. Essentially I have compiled a
2008 Jan 22
2
Help - linear regression
Hi, I am trying a linear regression model where the dependent variable is the size of the heart corrected for the patient's height and weight. This is labelled as LAVI. The independent variables are race (european or non-eurpoean), age, sex (male or female) of the patient and whether they have diabetes and high blood pressure. sample size 2000 patients selected from a community. when I
2006 Jun 14
2
lmer binomial model overestimating data?
Hi folks, Warning: I don't know if the result I am getting makes sense, so this may be a statistics question. The fitted values from my binomial lmer mixed model seem to consistently overestimate the cell means, and I don't know why. I assume I am doing something stupid. Below I include code, and a binary image of the data is available at this link:
2013 Jan 11
3
split & rbind (cast) dataframe
Hi, I would like to split dataframe based on one colum and want to connect the two dataframes by rows (like rbind). Here a small example: # The orgininal dataframe df1 <- data.frame(col1 = c("A","A","B","B"),col2 = c(1:4), col3 = c(1:4)) # The datafame how it could look like df2 <- data.frame(A.col2 = c(1,2), A.col3 = c(1,2), B.col2 = c(3,4), B.col3
2003 Jan 30
1
not enough charcters available in %J or confusing blanks?
Hi, I try to create PDF files with an modified script from Buchan Milne and have some problems with the Jobname var %J. Because it is better for the users to find an file with an similar name as the original document I'm looking for a way to read out %J, cut some unnessasary stuff and use the rest as new file name. The problem is: In %J in some circumstances is not the complete Jobname as
2015 Mar 06
0
[klibc:master] add-mips64-support-headers
Commit-ID: 493f9a99220aed4eb7c6e3dd9018c037d45b13e2 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=493f9a99220aed4eb7c6e3dd9018c037d45b13e2 Author: Dejan Latinovic <Dejan.Latinovic at imgtec.com> AuthorDate: Thu, 5 Mar 2015 16:51:44 -0800 Committer: H. Peter Anvin <hpa at linux.intel.com> CommitDate: Thu, 5 Mar 2015 16:51:44 -0800 add-mips64-support-headers
2018 May 01
2
how can I convert a long to wide matrix?
Hi R user, I was trying to convert a long matrix to wide? I have an example and would like to get a table (FinalData1): FinalData1 B1 B2 id_X "A" "B" id_Y "A" "B" but I got the following table using the following code. FinalData1 B1 B2 id_X "A" "A" id_Y "A" "B" the code and the
2005 Feb 04
3
Handling large data sets via scan()
I'm trying to read in datasets with roughly 150,000 rows and 600 features. I wrote a function using scan() to read it in (I have a 4GB linux machine) and it works like a charm. Unfortunately, converting the scanned list into a datafame using as.data.frame() causes the memory usage to explode (it can go from 300MB for the scanned list to 1.4GB for a data.frame of 30000 rows) and it fails
2018 May 01
0
how can I convert a long to wide matrix?
Hi Marna, Try this: library(prettyR) stretch_df(dat,idvar="ID",to.stretch=c("EventDate","SITE")) Jim On Wed, May 2, 2018 at 8:24 AM, Marna Wagley <marna.wagley at gmail.com> wrote: > Hi R user, > I was trying to convert a long matrix to wide? I have an example and would > like to get a table (FinalData1): > > > FinalData1 > B1
2018 May 01
2
how can I convert a long to wide matrix?
Hi Jim, Thank you very much for your suggestions. I used it but it gave me three sites. But actually I do have only two sites "Id_X" and "Id_y" . In fact "A" is repeated two times for "Id_X". If it is repeated, I would like to take the first one among many repeated values. dat<-structure(list(ID = structure(c(1L, 1L, 1L, 2L, 2L), .Label =
2009 May 26
5
Capability problems dovecot 2.0
Hi, I had some problems connecting TB 2.x with dovecot 2.0. TB2 complained about not being an IMAP4 server. TB 3 worked. It seems that dovecot 2.0 doesn't return capabilities when queried. Maybe some wrong config, thoug? Here are the debug logs from TB2 comparing dovecot 2.0 (not working) and dovecot 1.2 (working): Dovecot 2.0: NA:CreateNewLineFromSocket: * OK [CAPABILITY IMAP4rev1
2018 May 01
0
how can I convert a long to wide matrix?
Hi Marna, I think this is due to having three rows for id_X and only two for id_Y. The function creates a data frame with enough columns to hold the greatest number of values for each ID variable. Notice that the SITE_n columns contain three values for id_X (A, A, B) and two for id_Y (A, B, NA) as there was no third occasion of measurement for the latter. Even though there are only two _values_