Displaying 20 results from an estimated 800 matches similar to: "horizontal direct product"
2004 Sep 14
3
reshaping some data
Hi all,
I have a data.frame with the following colnames pattern:
x1 y11 x2 y21 y22 y23 x3 y31 y32 ...
I.e. I have an x followed by a few y's. What I would like to do is turn
this wide format into a tall format with two columns: "x", "y". The
structure is that xi needs to be associated with yij (e.g. x1 should
next to y11 and y12, x2 should be next to y21, y22, and
2006 Mar 24
1
Multiple error bar plots
Dear R-lister
I have a question about how to create multiple error bar plots.
I found that I can use an "errbar" function from Hmisc package to create one
error bar plot in which there are multiple data points (x, y) with the error
bars. Thus, I know that I can get "one" error bar plot which consists of
many data points. However, I did not find a way to put
2004 Jun 06
3
Average R-squared of model1 to model n
Hi,
We got a question about interpretating R-suqared.
The actual outputs for a test dataset is X=(x1,x2, ..., xn).
model 1 predicted the outputs as Y1=(y11,y12,..., y1n)
model n predicted the outputs as Y2=(y21,y22,..., y2n)
...
model m predicted the outputs as Ym=(ym1,ym2,..., ymn)
Now we have two ways to calculate R squared to evaluate the average performance of committee model.
(a)
2018 May 24
0
Manipulation of data.frame into an array
This is one of those instances where a less superficial knowledge of R's
technical details comes in really handy.
What you need to do is convert the data frame to a single (numeric) vector
for, e.g. a matrix() call. This can be easily done by noting that a data
frame is also a list and using do.call():
## imp is the data frame:
do.call(c,imp)
X11 X12 X13 X14 X15 X16 X17 X18 X19
2018 May 24
2
Manipulation of data.frame into an array
Hello everyone,
Thank you for this. Nonetheless it is not exactly want i need.
I need mydata[[1]] to provide the values for all 3 variables (Y, X1 and X2) of the first imputation only. As it stands it returns the whole database.
Any ideas?
Best,
ioanna
________________________________
From: Bert Gunter <bgunter.4567 at gmail.com>
Sent: 24 May 2018 16:04
To: Ioanna Ioannou
Cc:
2000 Aug 14
5
Writing a workable function
After searching in R- Introduction, FAQ, help... I don't understand
this:
I write a function in a file (.R):
tt <- function(mc) { date()
mc<-read.csv2("machines.txt",na.strings="")
date()
}
I source it in R and I type tt(). The answer is
> tt()
[1] "Mon Aug 14 11:18:25 2000"
>
The instructions following the first "date()" are ignored. Why?
2018 May 24
4
Manipulation of data.frame into an array
Hello everyone,
I want to transform a data.frame into an array (lets call it mydata), where: mydata[[1]] is the first imputed dataset...and for each mydata[[d]], the first p columns are covariates X, and the last one is the outcome Y.
Lets assume a simple data.frame:
Imputed = data.frame( X1 = c(1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2),
X2 =
2007 Aug 07
1
Error in as.double.default(x) : (list) object cannot be coerced to 'double'
Dear experts,
I have in all 14 matrices which stands for gene expression divergence and 14 matrices which stands for gene sequence divergence. I have tried joining them by using the concatanation function giving
SequenceDivergence <- c(X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14)
ExpressionDivergence <- c(Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,Y10,Y11,Y12,Y13,Y14)
where X1,X2..X14 are the
2007 Aug 07
0
plotting series of matrices on a single plot.
Dear experts,
I have in all 14 matrices which stands for gene expression divergence and 14 matrices which stands for gene sequence divergence. I have tried joining them by using the concatanation function giving
SequenceDivergence <- c(X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14)
ExpressionDivergence <- c(Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,Y10,Y11,Y12,Y13,Y14)
where X1,X2..X14 are the
2008 Oct 15
0
Iterative estimation of linear regression model
Dear all
I am intrested in making iterative estimation (thro' loop statements) of, say, linear regression model. For this purpose, I have written the following programme and that I have made use of a sample data (viz., exp.txt):
?
Programme:
?
# Linear regression modelling with sample data (try5.txt)
# Repeated estimation through loop statement
2011 Aug 05
2
Question on RNG
Hi all, I have happened to work on MS .NET for sometime now, and I found that this language offers RNG what is called as Donald E. Knuth's subtractive random number generator algorithm (found here: http://msdn.microsoft.com/en-us/library/system.random.aspx#Y12).
?
Here I was wondering whether R also have same RNG in it's inventory, so looked at ?set.seed. There I found 2 related RNGs
2009 Nov 27
6
Learning R - View datasets
Hi All,
I am making a serious effort to try to learn R, but one hurdle I am facing is that I need to "see" the data as I walk through the examples in the packages. For instance, many examples on the web start by a command like data("wines"). How can I actually view what the dataset looks like prior to transformations and analysis? I have tried to use edit() , print, and
2003 Jun 13
1
R 1.7.0 startup error: .addMethodFrom...
Does anyone know what could be causing the following error message on
startup of R:
Error in .addMethodFrom(def,argName[1],class[1],fromClass) :
object "*tmp*" not found.
I'm using R 1.7.0 and Windows 2000.
This happened shortly after I installed 1.7.0. Once it occurs, R freezes.
>From then on R will always freeze with this error message.
I reinstalled 1.7.0 and it worked
2019 Apr 24
1
Bug in "stats4" package - "confint" method
Dear R developers,
I noticed a bug in the stats4 package, specifically in the confint method applied to ?mle? objects.
In particular, when some ?fixed? parameters define the log likelihood, these parameters are stored within the mle object but they are not used by the ?confint" method, which retrieves their value from the global environment (whenever they still exist).
Sample code:
>
2002 Dec 09
0
Re: R-help digest, Vol 1 #10 - 6 msgs
°_§É§¿§¿
----- Original Message -----
From: <r-help-request at stat.math.ethz.ch>
To: <r-help at stat.math.ethz.ch>
Sent: Sunday, December 08, 2002 7:00 PM
Subject: R-help digest, Vol 1 #10 - 6 msgs
> Send R-help mailing list submissions to
> r-help at stat.math.ethz.ch
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
2003 Sep 17
2
Date on x-axis of xyplot
xyplot doesn't seem to want to label my x-axis with dates but instead puts
the day-number for each date.
begdate is the number of days since January 1, 1960 and was initially
created by
library(date)
...
polls$begdate<-mdy.date(begmm,begdd,begyy)
I create a new dataframe (pollstack) which includes begdate. In the process
begdate seems to lose its date attribute so I redo it as:
>
2014 Dec 09
4
[LLVMdev] dmb ishld in AArch64
Hi,
I got an optimization problem (O1, O2) regarding memory barrier “dmb ishld”
I find in the test/CodeGen/AArch64/intrinsics-memory-barrier.ll , it’s stated that memory access around DMB should not be reordered, but when compiling the Linux kernel, I found load/store in
static inline void hlist_add_before_rcu(struct hlist_node *n,
struct hlist_node *next)
{
n->pprev
2007 Mar 10
3
long character string problem
Hi All
I am having 2 very long character strings (550chars) and I want to put them as
expressions together with c(). The problem is that I also get these
double-quotes, as seen below in 'fct'. How can I remove these double-quotes? I
tried as.name() but it did not work (because of size?). These are creating
trouble with subsequent programs, which I tested with strings that for some
2014 Dec 09
4
[LLVMdev] dmb ishld in AArch64
I'm not sure, I was never able to compile the whole kernel with -O0, too many errors. Plus, the problem seems to be within machine code generation. I tried opt -O1 and -O2, the generated .ll file does not diff much for the target function (insert_leaf_info).
Thanks,
Chengyu
> On Dec 9, 2014, at 4:49 PM, Tim Northover <t.p.northover at gmail.com> wrote:
>
> On 9 December 2014
2005 Dec 06
5
Matrix of dummy variables from a factor
What is a simple way to convert a factor into a matrix of dummy variables?
fm<-lm(y~f)
where f is a factor takes care of this in the estimation. I'd like to
save the result of expanding f into a matrix for later use.
Thanks.
Charles
--
Charles H. Franklin
Professor, Political Science
University of Wisconsin, Madison
franklin at polisci.wisc.edu
chfrankl at wisc.edu