search for: recasting

Displaying 20 results from an estimated 84 matches for "recasting".

Did you mean: recanting
2011 Mar 16
1
linear regression in a data.frame using recast
I have a very large dataset with columns of id number, actual value, predicted value. This used to be a time series but I have dropped the time component. So I now have a data.frame where the id number is repeated but each value in the actual and predicted columns are unique. I assume I need to use recast somehow but I'm at a loss... how can I perform a simple linear regression (using
2011 Nov 29
2
Help with recast() syntax
Dear Help-Rs,   I have data similar to the following:   DF <- structure(list(X = 1:22, RESULT = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("NEG", "POS"), class = "factor"), YR_MO = c(201011L, 201012L, 201101L, 201102L, 201103L, 201104L, 201105L, 201106L, 201107L, 201108L, 201109L, 201011L,
2011 Mar 16
1
linear regression in a data.frame using recast -- A fortunes candidate??
Ha! -- A fortunes candidate? -- Bert > > If this is really a time series, then you will have serious validity > problems due to auto-correlation among non-independent units. (But if you > are just searching for a way to pull the wool over the eyes of the > statistically uninformed, then I guess there's no stopping you.) > > -- > > David Winsemius, MD > West
2009 Dec 04
5
logical masking of a matrix converts it to a vector
One problem I've been having is the special case in which only one row/column remains and the variable gets converted into a vector when entries are removed by logical masking. This is a problem because subsequent code may rely on matrix operations (apply, colsums, dim, etc) For example: > a <- matrix(c(1, 2, 3, 4), nrow = 2) > a [,1] [,2] [1,] 1 3 [2,] 2 4 >
2006 Feb 02
4
How to force a vector to be column or row vector?
Hi all, I tended to use rbind, or cbind to force a vector be be deemed as a column or row vector. This is very important if I want to do things like u' * A * u, where u' is a row vector and u is a column vector, regardless of what originall format the "u" is... I want to recast it to column vector or row vector... How can I do that?
2010 Oct 13
2
[LLVMdev] [Q] x86 peephole deficiency
Am 07.10.2010 um 19:50 schrieb Chris Lattner: > > On Oct 6, 2010, at 6:16 PM, Gabor Greif wrote: > >> Hi all, >> >> I am slowly working on a SwitchInst optimizer (http://llvm.org/ >> PR8125) >> and now I am running into a deficiency of the x86 >> peephole optimizer (or jump-threader?). Here is what I get: >> >> >> andl $3,
2012 Jul 25
2
reshape -> reshape 2: function cast changed?
Hi, I used to use reshape and moved to reshape2 (R 2.15.1). Now I tried some of my older scripts and was surprised that my cast function wasn't working like before. What I did/want to do: 1) Melt a dataframe based on a vector specifying column names as measure.vars. Thats working so far: dfm <- melt(df, measure.vars=n, variable_name = "species", na.rm = FALSE) 2) Recast the
2010 Oct 13
0
[LLVMdev] [Q] x86 peephole deficiency
On Oct 13, 2010, at 11:22 AM, Gabor Greif wrote: > Hi Chris, > > I had a look into MachineCSE, but it looks like MBB-oriented. > The above problem is an inter-block one. Also MCSE seems > to perform value numbering on virtual/physical registers, which > does not map very well to status register bits that are implicitly > defined. > Any chance to recast this issue as a
2006 Feb 12
0
SUMMARY: aggregate vs. tapply
Hi all; Thanks for the responses to my query of how to make tapply into a table instead of an n-dimensional array. Summary of responses follows: Peter Dalgaard: as.data.frame(with(tmp,as.table(tapply(C,list(A=A,B=B),sum)))) Phil Spector wrote: z = tapply(y,list(var1,var2,var3,var4),sum) data.frame(do.call('expand.grid',dimnames(z)),y=do.call('rbind',as.list(z))) Hans
2001 Mar 20
3
Newbie question about by() -- update
Sorry about the lack of detail. I am running R v.1.2.2. I can recast my question (which I think I have partially answered) more succinctly as follows: 1. This seems to work (note that group takes values 1,2,3,4, or 5): my.newfun <- function(x) myfile <- lm(award ~ ilogemp + ilogage, x) test.by <- by(wintemp, as.factor(wintemp$group), my.newfun) 2. This does not work (leaving aside
2011 Nov 02
2
Proper Syntax for Logical Subset in Subset()
I have measured values for 47 chemicals in a stream. After processing the original data frame through reshape2, the recast data frame has this structure: 'data.frame': 256 obs. of 47 variables: $ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 1 2 2 2 2 2 2 2 ... $ sampdate : Date, format: "1996-04-19" "1996-05-21" ... $ Acid :
2012 Jan 13
1
apply transformation
Hello All, I have the following dataset: Year 2006 2007 Jan Jan 0.0204 0.0065 Feb Feb 0.0145 0.0082 Mar Mar 0.0027 0.0122 > dput(d_tmp) structure(list(Year = c("Jan", "Feb", "Mar"), `2006` = c(0.0204, 0.0145, 0.0027), `2007` = c(0.0065, 0.0082, 0.0122)), .Names = c("Year", "2006", "2007"), row.names = c("Jan",
2012 Apr 17
1
Cummerbund differential expression data analysis package issue
...altrans/tophat/0125diff_out') Creating database /home/sbica1/tophat/finaltrans/tophat/0125diff_out/cuffData.db Reading /home/sbica1/tophat/finaltrans/tophat/0125diff_out/genes.fpkm_tracking Checking samples table... Populating samples table... Writing genes table Reshaping geneData table Recasting Writing gene Data table Reading /home/sbica1/tophat/finaltrans/tophat/0125diff_out/gene_exp.diff Error in function (classes, fdef, mtable) : unable to find an inherited method for function "make.db.names", for signature "SQLiteConnection", "integer" csVolcano(ge...
2007 Jan 09
1
contingency table analysis; generalized linear model
...as.data.frame(xtabs(~Age+Site, data=SSites.Rev, drop.unused.levels=T)) glm(Freq ~ Age + Site, data=glm.table, family='poisson') where Site is a factor and Age is cast as a factor by xtabs() and treated as such. **Question**: Is it acceptable to step away from contingency table analysis by recasting Age as a numerical variable, and redoing the analysis as: glm(Freq ~ as.numeric(Age) + Site, data=glm.table, family='poisson') My reasons for wanting to do this are to be able to include non-linear terms in the model, using say restricted or natural cubic splines. Thank you in advance fo...
2016 Apr 11
0
[FORGED] Re: identical() versus sapply()
...lain this one: > str(1) num 1 > str(1:2) int [1:2] 1 2 > str(as.numeric(1:2)) num [1:2] 1 2 > str(as(1:2,"numeric")) int [1:2] 1 2 Which doubly makes no sense. 1) Either the class is "numeric" or it isn't; I did not call as.integer() here. 2) method of recasting should not affect final class. Thanks, Ariel -----Original Message----- From: Rolf Turner [mailto:r.turner at auckland.ac.nz] Sent: Saturday, April 09, 2016 5:27 AM To: Jeff Newmiller Cc: Paulson, Ariel; 'r-help at r-project.org' Subject: Re: [FORGED] Re: [R] identical() versus sapply()...
2009 May 09
1
Improve aggregate.default ...?
Hi, I find it a bit annoying that aggregate.default forces the returned object to loose the 'name' of the variable aggregated, replacing it with 'x'. A brief example: > dat <- data.frame(A = runif(100), B = rnorm(100), + Group = gl(4, 25)) > with(dat, aggregate(A, by = list(Group = Group), FUN = mean)) Group x 1 1 0.6523228 2 2
2011 Sep 26
1
Restructuring data - unstack, reshape?
Hi all, I'm having a problem restructuring my data the way I'd like it. I have data that look like this: Candidate.ID Specialty Office Score 110002 C London 47 110002 C East 48 110003 RM West 45 110003 RM
2011 Oct 21
2
stacked plot
Hi! I am trying to use ggplot2 to create a stacked bar plot. Previously I tried using barplot() but gave up because of problems with the positioning of the legend and other appearance problems. I am now trying to learn ggplot2 and use it for all the plots that I need to create for my dissertation. I am able to create normal bar plots using ggplot2, but I am stomped with the stacked bar plots.
2016 Apr 11
5
[FORGED] Re: identical() versus sapply()
...str(1:2) > int [1:2] 1 2 > >> str(as.numeric(1:2)) > num [1:2] 1 2 > >> str(as(1:2,"numeric")) > int [1:2] 1 2 > > Which doubly makes no sense. 1) Either the class is "numeric" or it isn't; I did not call as.integer() here. 2) method of recasting should not affect final class. > > Thanks, > Ariel > > > -----Original Message----- > From: Rolf Turner [mailto:r.turner at auckland.ac.nz] > Sent: Saturday, April 09, 2016 5:27 AM > To: Jeff Newmiller > Cc: Paulson, Ariel; 'r-help at r-project.org' > Subjec...
2005 Oct 29
3
CentOS proviiding additional services > was Setting up Tomcat
...ing such a compendium of instructions on the CentOS Forum and keeping the compendium up to date? Think how many hours of googling and searching mail archives and copious RTFM could be saved! Instead of firing off a mail to this list, you could first look in a well known place on the Forum and avoid recasting a round object. I'm not in a position to undertake such an endeavor. I keep current with CentOS, and I want to see CentOS thrive, but I have only a peripheral interest in CentOS, and that peripheral interst is a work connection. My employer, like many others, prefers to have a contractural arr...