Displaying 20 results from an estimated 20000 matches similar to: "help about R basic"
2011 May 30
2
Basic question about three factor Anova
Read the data using scan():
#
# a1 a2 a3 a4
# ------------- ------------- ------------- -------------
# b1 b2 b3 b1 b2 b3 b1 b2 b3 b1 b2 b3
# --- --- --- --- --- --- --- --- --- --- --- ---
#
# c1:
# 4.1 4.6 3.7 4.9 5.2 4.7 5.0 6.1 5.5 3.9 4.4 3.7
# 4.3 4.9
2013 Sep 05
2
binary symmetric matrix combination
Hi,
May be this helps:
m1<- as.matrix(read.table(text="
y1 g24
y1 0 1
g24 1 0
",sep="",header=TRUE))
m2<-as.matrix(read.table(text="y1 c1 c2 l17
?y1 0 1 1 1
?c1 1 0 1 1
?c2 1 1 0 1
?l17 1 1 1 0",sep="",header=TRUE))
m3<- as.matrix(read.table(text="y1 h4??? s2???? s30
?y1 0 1 1 1
?h4 1 0 1 1
?s2 1 1 0 1
?s30 1 1 1
2005 Aug 15
2
queer data set
I have a dataset that is basically structureless. Its dimension varies
from row to row and sep(s) are a mixture of tab and semi colon (;) and
example is
HEADER1 HEADER2 HEADER3 HEADER3
A1 B1 C1 X11;X12;X13
A2 B2 C2 X21;X22;X23;X24;X25
A3 B3 C3
A4 B4 C4 X41;X42;X43
A5 B5 C5 X51
etc., say. Note that a blank
2015 Dec 19
2
[PATCH] nvc0: add hardware ETC2 and ASTC support where possible
These are supported on GK20A and GM107.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
Was a bit torn on where to place the enums... we're about to gut all
the xml definitions so this seemed appropriate for now.
Tested on GK20A only.
src/gallium/drivers/nouveau/nv50/nv50_formats.c | 64 +++++++++++++++++++++++++
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 10 ++++
2016 Feb 15
1
[PATCH 09/23] nv50-: separate vertex formats from surface format descriptions
Why not fix the new names instead to be like the old names? Seems like that
would be way simpler...
On Feb 15, 2016 12:38 AM, "Ben Skeggs" <skeggsb at gmail.com> wrote:
> From: Ben Skeggs <bskeggs at redhat.com>
>
> We've previously had identical naming between vertex and texture
> formats, so it mostly made sense to define these together.
>
> However,
2009 May 26
2
Linear Regression with Constraints
Hi!
I am a bit new to R.
I am looking for the right function to use for a multiple regression problem
of the form:
y = c1 + x1 + (c2 * x2) - (c3 * x3)
Where c1, c2, and c3 are the desired regression coefficients that are
subject to the following constraints:
0.0 < c2 < 1.0, and
0.0 < c3 < 1.0
y, x1, x2, and x3 are observed data.
I have a total of 6 rows of data in a data set.
Is
2015 Apr 15
2
[LLVMdev] Instruction combiner multiplication canonicalization
Hi,
I observed below behavior with Instruction combiner (visitMul Canonicalization)
It tries to convert "(X+C1)*C2" to "X*C2+C1*C2"
While transforming if operation is guaranteed to not overflow it does not
reflect same property to transformed instructions.
Consider following scenarios:
1) If input is ((X+C1)*C2)<nsw>
Then post canonicalization output should be
1999 Dec 22
0
Apply dimnames (PR#385)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---559023410-1251336619-945861747=:5357
Content-Type: TEXT/PLAIN; charset=US-ASCII
While fiddling with apply I noticed that there appears to be an error in
the dimnames, which actually
2009 Mar 01
1
Understanding Anova (car) output
Dear professor Fox and R helpers,
I have a quick question about the Anova function in the car package.
When using the default "type II" SS I get results that I don't
understand (see below).
library(car)
Data <- data.frame(y=rnorm(10), x1=factor(c(rep("a",4), rep("b",6))),
x2 = factor(c(rep("j", 2), rep("k", 3), rep("j", 2),
2007 Dec 19
3
array addition
Hi
suppose I have two arrays x1,x2 of dimensions a1,b1,c1 and
a2,b2,c2 respectively.
I want x = x1 "+" x2 with dimensions c(max(a1,a2), max(b1,b2),max
(c1,c2))
with
x[a,b,c] = x1[a1,b1,c1] + x2[a2,b2,c2] if a <=min(a1,a2) , b<=min
(b1,b2), c<=min(c1,c2)
and the other bits either x1 or x2 or zero according to whether the
coordinates
are "in range" for
2011 Oct 12
3
Applying function to only numeric variable (plyr package?)
My data frame consists of character variables, factors, and proportions,
something like
c1 <- c("A", "B", "C", "C")
c2 <- factor(c(1, 1, 2, 2), labels = c("Y","N"))
x <- c(0.5234, 0.6919, 0.2307, 0.1160)
y <- c(0.9251, 0.7616, 0.3624, 0.4462)
df <- data.frame(c1, c2, x, y)
pct <- function(x) round(100*x, 1)
I want to
2009 Jul 01
1
How should I denormalise a data frame list of lists column?
Hi,
I have a data frame where one column is a list of lists. I would like to
subset the data frame based on membership of the lists in that column and be
able to 'denormalise' the data frame so that a row is duplicated for each of
its list elements. Example code follows:
# The data is read in in this form with the c2 list values in single strings
which I then split to give lists:
> f1
2007 Aug 27
1
use apply function with which
Dear R-users,
For a data frame (say in this example X) I want to look up the
corresponding value in a 'look-up data frame' (in this example Y). The
for-loop works but is very time-consuming because 'X' in reality is very
big.
Therefore I would like to have a solution with apply. However, I do not
succeed. Any suggestions?
Thanks in advance,
Hanneke
2012 Apr 04
2
Selecting obs within groups defined by 2 variables
Hello,
I am relatively new to R, and I am trying to select the last
observation within a group, where the group is defined by two
variables. One of the variables is a date.
In the below example, C3 varies within C2, which varies within C1. I
need to select the last observation in C3 for 4 groups (C1*C2): 1x,
1y, 2x, and 2y. In my real dataset, C2 is a date (mm/dd/yy)
C1 C2 C3
1 x 1
1
2007 May 21
1
list element names in S4 class extending list
can list names attributes be preserved through S4
class containment? seems to be so but only if the containment
relationship is direct ... see below.
> setClass("c1", contains="list")
[1] "c1"
> l1 = list(a=1, b=2)
> o1 = new("c1", l1)
> names(o1) # pleasant surprise
[1] "a" "b"
> setClass("c2",
2012 Jul 10
1
cbind and cbind.data.frame
## Hi, I'm having trouble understanding how the cbind function decides what
method to apply to its arguments. Easy cut and paste code below.
>
>
>
> ## create two columns
> c1 <- c("A","A","B","B")
> c2 <- 1:4
>
> ## cbind outputs a matrix with elements that are characters, seems
reasonable
> out <-
2011 Dec 20
5
Help with code
hello gurus,
i have a data frame like this
HTN HTN_FDR Dyslipidemia CAD t1d_ptype[1:25]
1 Y Y Y T1D
2 T1D
3 Ctrl_FDR
4 T1D
5 Y Ctrl
6 Ctrl
7
2012 Mar 20
2
Constraint Linear regression
Hi there,
I am trying to use linear regression to solve the following equation -
y <- c(0.2525, 0.3448, 0.2358, 0.3696, 0.2708, 0.1667, 0.2941, 0.2333,
0.1500, 0.3077, 0.3462, 0.1667, 0.2500, 0.3214, 0.1364)
x2 <- c(0.368, 0.537, 0.379, 0.472, 0.401, 0.361, 0.644, 0.444, 0.440,
0.676, 0.679, 0.622, 0.450, 0.379, 0.620)
x1 <- 1-x2
# equation
lmFit <- lm(y ~ x1 + x2)
lmFit
Call:
2009 Feb 17
2
Chromatogram deconvolution and peak matching
Hi,
I'm trying to match peaks between chromatographic runs.
I'm able to match peaks when they are chromatographed with the same method,
but not when there are different methods are used and spectra comes in to
play.
While searching I found the ALS package which should be usefull for my
application, but I couldn't figure it out.
I made some dummy chroms with R, which mimic my actual
2008 Jul 07
2
Colour clusters in a 2d plot
R experts,
I have three columns. c1 and c2 are numeric variables whereas c3 are the
clusters classes (nominal variable, 10 different: cluster1, cluster2,
cluster3, cluster4, cluster5 ....). I'd like to plot c1 against c2 (easy!)
in a 2D plot and put different color depending to the cluster class
automatically regardless the number of clusters.
Could anyone give a hand?
Josep Maria,
matrix