search for: recasts

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

Did you mean: recast
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
Hi all, I'm having the same issue as in this previous post: http://r.789695.n4.nabble.com/R-error-td4200447.html#a4209042 And as another user of Biostar: http://www.biostars.org/post/show/42562/cummerbund-isnt-managing-cuffdiff-database/#42895 Whereby I'm trying to output cuffdiff data into cummeRbund, but it appears to be having issues with connection to a database (below). Does anyone
2007 Jan 09
1
contingency table analysis; generalized linear model
Dear List, I would appreciate help on the following matter: I am aware that higher dimensional contingency tables can be analysed using either log-linear models or as a poisson regression using a generalized linear model: log-linear: loglm(~Age+Site, data=xtabs(~Age+Site, data=SSites.Rev, drop.unused.levels=T)) GLM: glm.table <- as.data.frame(xtabs(~Age+Site, data=SSites.Rev,
2016 Apr 11
0
[FORGED] Re: identical() versus sapply()
Ok, I see the difference between 1 and 1:2, I'll just leave it as one of those "only in R" things. But it seems then, that as.numeric() should guarantee a FALSE outcome, yet it does not. To build on what Rolf pointed out, I would really love for someone to explain this one: > str(1) num 1 > str(1:2) int [1:2] 1 2 > str(as.numeric(1:2)) num [1:2] 1 2 >
2009 May 09
1
Improve aggregate.default ...?
...oup = Group), FUN = mean)) Group x 1 1 0.6523228 2 2 0.4544317 3 3 0.4619624 4 4 0.4703156 This arises because aggregate default has: function (x, ...) { if (is.ts(x)) aggregate.ts(as.ts(x), ...) else aggregate.data.frame(as.data.frame(x), ...) } which recasts x as a data frame, but doesn't make any effort to supply a name. Can we do a better job of supplying a useful name? My first attempt is: aggregate.default <- function(x, ...) { if (is.ts(x)) aggregate.ts(as.ts(x), ...) else { nam <- deparse(substitute(x))...
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()
Indeed! Slightly simplified to emphasize your point: > class(as(1:2,"numeric")) [1] "integer" > class(as.numeric(1:2)) [1] "numeric" whereas in ?as it says: "Methods are pre-defined for coercing any object to one of the basic datatypes. For example, as(x, "numeric") uses the existing as.numeric function. " I suspect this is related to
2005 Oct 29
3
CentOS proviiding additional services > was Setting up Tomcat
This thread (... Tomcat ...) emphasizes the essential conundrom of CentOS whose mission is to provide a community-based, well-maintained and freely distributable version of the stable enterprise software from the Well Known North American VENDOR (WKNAV). There is a essential gap betweenthe community (I want lots of current packages) and the WKNAV base (you get what I choose to provide). As CentOS