Displaying 20 results from an estimated 2000 matches similar to: "sampling from data frame"
2009 Jun 16
1
Output of Anova (CAR package) in Sweave
Dear list,
I use Sweave almost exclusively for writing papers, and I have become
quite spoiled by the excellent xtable export facilities. Has anybody
written an xtable method for the Anova function in CAR, or has anybody
used a different set of functions to import Anova results into
a table in an Sweave document? If not, any handy hints on how to
write a good homebrew based on the output of Anova
1999 Jun 05
2
R: question about vectors + for loop
Hi,
first of all: I'm not only new to R, but also to S.
I hope this is the right forum for asking the following
very stupid questions:
a) is there a straightforward way of saying
for all factors f in a data frame {
any old function, e.g. max(f)
}
b) how can you construct a new data frame d' from
a given data frame d which contains only rows
with [X=="A"] (x is
2000 Feb 02
0
Factor Analysis?
Hello.
I have been browsing the R- manual and not seen any direct
implementation of Factor analysis.
Is there anyone out there who has run Factor Analysis with R?
Thanks
Michael
--
Michael Preminger
Forsker / Research Scientist
Avdeling for journalistikk,
bibliotek- og informasjonsfag /
Faculty of Journalism, Library and
Information Science
H?gskolen i Oslo / Oslo College
2001 Mar 12
2
How to debug/fix "err:win32:fixup_imports"
I ran into the following error message :
---snipp---
Call kernel32.495: LoadLibraryA(102951c8 "ctmp3Lib.dll") ret=1025f5ad fs=008f
Call kernel32.922: __wine_register_dll_16(418ff5ac) ret=418bd4f0 fs=008f
Ret kernel32.922: __wine_register_dll_16() retval=418ff5ac ret=418bd4f0 fs=008f
err:win32:fixup_imports No implementation for
NTDLL.dll.3(IoUnregisterDeviceInterface), setting to
1999 Nov 12
1
Wanted: online Introduction to R
As a complete newcomer I am attempting to learn to use R, but am finding
it extremely difficult because I have not yet found an "Introduction to
R".
For over a week now I have monitored the R-help list, studied the R-FAQ
and related documents, downloaded and run the Windows R and looked at
the Help, downloaded early and late samples of the R-help archives, and
searched for illuminating
2012 Apr 25
1
Using apply() with a function involving ode()
Hello,
I am trying to get the output from the numerical simulation of a system
of ordinary differential equations for a range of values for three
parameters. I am using the ode() function (deSolve package) to run the
numerical simulation and apply() to run the simulation function for each
set of parameter values. I am having trouble getting the apply()
function to work.
Here is an
2005 Jul 06
1
Question regarding SWAT
Hi everyone,
In the last few days I've spended hours and hours on the web surching for a solution to my problems. Eventhough it looked like there where several other people having the same problem I couldn't find a way to solve it.
Therefore I'm hoping that one of you could help me with the following problem.
I've installed Samba 3.0.14a on RedHat 9.0. Samba is working perfectly.
2003 Jan 21
1
Orders of terms in formulae
Hi,
Given that R reports Type I sums of squares, isn't it a bit anachronistic
that it re-orders terms in formulae?
> d <- expand.grid(y=rnorm(8),
+ A=factor(c(1,2)),
+ B=factor(c(1,2)),
+ C=factor(c(1,2)))
> summary(aov(y ~ A+B+A:B+C,data=d))
Df Sum Sq Mean Sq F value Pr(>F)
A 1 8.294e-34 8.294e-34 1.027e-33 1
2002 Jul 16
2
ANOVA-like tests of geometrically-distributed data
I have a statistical problem which has given me no end of grief recently,
and am posting here in the hope that somebody can give me a straight
answer. I'm a IT postgrad, not a statistician, so people may have to
speak really slowly and clearly for me to get it :)
I am collecting simulation data, and the results are geometrically
distributed (or approximately so). From what I can gather
2007 Nov 30
2
Quantiles and QQ plots
I have 20 variables:
5,9,6,1,5,9,7,4,5,6,3,2,4,8,9,6,1,8,4,8
How do I calculate the corresponding quantiles from a normal distribution
with the same mean and variance as the sample?
Also, how do I draw a QQ plot of the data?
Thanks for any help!
--
View this message in context: http://www.nabble.com/Quantiles-and-QQ-plots-tf4925742.html#a14097909
Sent from the R help mailing list archive at
2004 Sep 24
3
Error with repeat lines() in function
I have a function that does some plotting. I then add lines to the
plot. If executed one line at a time, there is not a problem. If I
execute the function, though, I get:
Error in ans[[1]] : subscript out of bounds
This always occurs after the second lines command, and doesn't happen
with all of my data points (some do not have errors). Any ideas?
Thanks,
Sean
2012 Dec 14
1
format.pval () and printCoefmat ()
Hi List,
My goal is to force R not to print in scientific notation in the sixth column (rel_diff - for the p-value) of my data frame (not a matrix).
I have used the format.pval () and printCoefmat () functions on the data frame. The R script is appended below.
This issue is that use of the format.pval () and printCoefmat () functions on the data frame gives me the desired results, but coerces
2008 Jul 11
1
Suggestion: 20% speed up of which() with two-character mod
Hi,
by replacing 'll' with 'wh' in the source code for base::which() one
gets ~20% speed up for *named logical vectors*.
CURRENT CODE:
which <- function(x, arr.ind = FALSE)
{
if(!is.logical(x))
stop("argument to 'which' is not logical")
wh <- seq_along(x)[ll <- x & !is.na(x)]
m <- length(wh)
dl <- dim(x)
if (is.null(dl)
2013 Jan 13
3
extracting character values
Dear all,
I have a dataframe of names (netw), with each cell including last name and initials of an author; some cells have NA. I would like to extract only the last name from each cell; this new dataframe is calle 'res'
Here is what I do:
res <- data.frame(matrix(NA, nrow=dim(netw)[1], ncol=dim(netw)[2]))
for (i in 1:x)
{
wh <- regexpr('[a-z]{3,}',
2017 Aug 06
2
data frame question
Dear All,
wonder if you have thoughts on the following:
let us say we have:
df<-data.frame(a=c(1,2,3,4,5,1,2,3,4,5,6,7,8),b=c(0,1,2,3,4,0,1,2,3,4,5,6,7))
I would like to rewrite values in column name "a" based on values in column name "b", where based on a certain value of column "b" the next value of column 'a' is prompted, in other words would like
2017 Aug 24
5
functions from 'base' package are not accessible
Hi all!
The following code (executed in console)...
somevar <- data.frame(v1 = 1:5, somestring = 6:10, v3 = 11:15, v4 = 16:20);
somevar %>% gather(key = var, value = val, which(names(somevar) == "somestring"):length(somevar)) %>% head(2);
throws...
Error in which(names(somevar) == "somestring") :
could not find function "which"
if I change
2001 Mar 12
2
General tweaking tips for wine?
Does anyone have any general tips on how to get programs to work on Wine? I
hear lots of success stories for various programs which I have failed to
get working on my own machine. But then again, my own version of wine is a
bog-standard installation without any special adjustments made to it.
What are the steps usually taken to attempt to get a program to run under
Wine? Or is that too
2002 Nov 11
0
FW: nmbd help please
the original message looks like it was corrupted when it got to the list, so here's another try ...
-----Original Message-----
From: Tim Wolters
Sent: Sun 11/10/2002 10:55 AM
To: samba@lists.samba.org
Cc:
Subject: nmbd help please
I've been working on this for about a week now and can't seem to figure out the magic configuration that will make my Samba server work.
2012 Nov 15
3
how to view source code of a function inside a package?
Dear list,
I am trying to look at the function inside a package. I know that
methods() would do the trick, but what if the function is hidden? I have a
problem displaying the hidden function.
Say, for example the MCMC package. How do you view the code of that
function?
something like this:
> which
function (x, arr.ind = FALSE, useNames = TRUE)
{
wh <- .Internal(which(x))
if
2017 Aug 06
0
data frame question
Your specification is a bit unclear to me, so I'm not sure the below
is really what you want. For example, your example seems to imply that
a and b must be of the same length, but I do not see that your
description requires this. So the following may not be what you want
exactly, but one way to do this(there may be cleverer ones!) is to
make use of ?rep. Everything else is just fussy detail.