Displaying 20 results from an estimated 30000 matches similar to: "convert factor to indicator matrix"
2009 Jul 01
2
'singularity' between fixed effect and random factor in mixed model
Hi,
I just came across the following issue regarding mixed effects models:
In a longitudinal study individuals (variable ind) are observed for some
response variable. One explanatory variable, f, entering the model as
fixed effect, is a (2-level) factor. The expression of that factor is
constant for each individual across time (say, the sex of the
individual). ind enters the model as grouping
2009 May 16
3
converting numeric to integer
Hello,
Suppose I have x, which is a variable of class numeric. The calculations
performed to yield x imply that mathematically it should be an integer ,
but due to round-off errors, it might not be (and so in either
direction). The error is however small, so round(x) will yield the
appropriate integer value. Moreover, this integer values is guaranteed
to be representable by an
2009 Feb 21
2
difference between assignment syntax <- vs =
Hi,
Both operators <- and = can be used to make an assignment. My question
is: Is there a semantic difference between these two? Some time ago, I
remember I have read that because of some reason, one should be given
preference over the other - but I cannot remember the source, nor the
argument, nor which operator the preferred was.
What is the present state ?
Is still one version better
2009 Mar 13
2
changing function argument
Hi,
I wonder if the following is possible in R:
Suppose a function takes an argument, and wants to modify this argument
so that the change is visible _at the call side_. It would be what is
for example known as pass-by-reference-to-non-const in C++.
test <- function(x)
{
x <- 10
...
return (somethingElse) # I do NOT want having to return x
}
number = 5
test(number)
2009 Feb 11
2
generalized mixed model + mcmcsamp
Hi,
I have fitted a generalized linear mixed effects model using lmer
(library lme4), and the family = quasibinomial. I have tried to obtain a
MCMC sample, but on calling mcmcsamp(model1, 1000) I get the following
error which I don't understand at all:
Error in .local(object, n, verbose, ...) : Update not yet written
traceback() delivers:
4: .Call(mer_MCMCsamp, ans, object)
3:
2012 Oct 17
1
[LLVMdev] Howto Guide on Porting the LLVM Assembler
Yes, please do.
Simon
On Wed 17 Oct 2012 02:20:17 BST, Sean Silva wrote:
> Wow this is awesome! Would it be okay if we linked to this from llvm.org/docs?
>
> -- Sean Silva
>
> On Tue, Oct 16, 2012 at 5:55 PM, Simon Cook <simon.cook at embecosm.com> wrote:
>> Hi Everyone,
>>
>> I have been implementing the integrated assembler for the OpenRISC 1000
>>
2006 Sep 20
1
how to delete some columns from a matrix based on some other indicator variable
Hello,
I am not very familiar with R and need help in deleting a few columns in a
matrix.
Suppose I have a indicator variable called r and it's defined as r = (0, 0,
1, 1). A matrix D is a 3X4 matrix. If I want a new matrix which contains
only the columns of D corresponding to the elements of r that equal to 1.
how can i write a loop which creat a new matrix that contains only the last
2003 Apr 22
4
converting to factor
hello,
I have a list of numbers that I want to convert into factors representing
ranges of values. For example, if I have
c(2.5, 1.6, 3.2)
I might want a list of factors like
c("<3", "<3", ">3")
I think I can do this by writing a function and using apply, as.matrix,
&c., but I'm looking for a nicer way. Any help is greatly appreciated.
Thanks!
2009 Dec 18
2
how to combine multiple indicator variables in a single factor
Say I have a dataframe like this:
df <- data.frame(cbind(c(1,0,0,1),c(0,1,0,0),c(0,0,1,0)))
names(df) <- c('a','b','c')
I would like to create a factor in a new column, where the factor values are taken from the column names, like this:
> df2
a b c f
1 1 0 0 a
2 0 1 0 b
3 0 0 1 c
4 1 0 0 a
How would I do this? Thanks,
Dan
Daniel Nordlund
Bothell, WA USA
2010 Jul 14
1
convert data.frame to matrix -> NA factor problem
Hi list,
I tried to convert a data.frame into a matrix using data.matrix.
Unfortunately my matrix contains missing values (NA) wherefore all columns
including NA's were changed into factors.
I thought that many people stumbled across that problem already wherefore
there must be a
simple solution. But it seems there isn't. I tried lapply, replace and other
things in combination
but still
2019 May 14
2
weakforced and GeoIP lookups
Hi Tobi,
it should just work, but depends on the OS version.
./configure ?help tells you all the configure options, including:
--with-maxminddb-includedir
path to maxminddb include directory [default=auto]
--with-maxminddb-libdir path to maxminddb library directory [default=auto]
Neil
> On 14 May 2019, at 17:44, Tobi via dovecot <dovecot at dovecot.org>
2007 Oct 24
3
convert factor dataframe into numeric matrix
Bear me if this is a naive question.
I have a dataframe, all lists inside it are factors. When I use
as.matrix(df) to convert, I get a character matrix while my intention is to
get numeric matrix. I can make the convertion iteratively by each list but
I do think there is some more elegant way of doing this.
please let me know if I missed somthing there.
Thanks in advance.
Sun
2008 Mar 19
1
one/multi-dimensional scaling with incomplete dissimilarity matrix
Dear David,
you asked this question a while ago on the R mailing list and got no
answer. I have the same problem and was wondering if you had found a solution
Cheers
Loic
Loic Thibaut, PhD candidate,
ARC Centre of Excellence for Coral Reef Studies,
School of Marine Biology, James Cook University,
Townsville,
Qld, 4811, Australia.
Tel + 61 747 815 735, Fax: + 61 747 251 570, email:
2019 May 14
2
weakforced and GeoIP lookups
Hi Tobi,
This looks like you haven?t included the libmaxmind libraries before running configure. GeoIP support is only compiled in if it finds the right libs.
This would be libmaxminddb-dev on Ubuntu for example.
Neil
>> Hi list
>>
>> hope it's okay to ask weakforced questions here as well, but I could not
>> find a dedicated mailinglist for wforce.
>>
2003 Sep 03
1
plot only partial plots
Hi everybody,
I would like to plot only a part of a data frame, and identify the
IDs for all the points with values higher than a certain value. I
will try to be more explicit:
I did a qqnorm plot of my data. It is obvious from the plot that
all the sample quantiles which are in Theoretical Quantiles = or >
than 1 belong to another group. To be sure about that I plot the
cooks.distance
2023 Oct 05
1
[PATCH 0/9] drm: Annotate structs with __counted_by
Am 02.10.23 um 20:22 schrieb Kees Cook:
> On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian K?nig wrote:
>> Am 02.10.23 um 20:08 schrieb Kees Cook:
>>> On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian K?nig wrote:
>>>> Am 02.10.23 um 18:53 schrieb Kees Cook:
>>>>> On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote:
2023 Oct 05
1
[PATCH 0/9] drm: Annotate structs with __counted_by
Am 02.10.23 um 20:22 schrieb Kees Cook:
> On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian K?nig wrote:
>> Am 02.10.23 um 20:08 schrieb Kees Cook:
>>> On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian K?nig wrote:
>>>> Am 02.10.23 um 18:53 schrieb Kees Cook:
>>>>> On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote:
2023 Oct 05
1
[PATCH 0/9] drm: Annotate structs with __counted_by
Am 02.10.23 um 20:22 schrieb Kees Cook:
> On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian K?nig wrote:
>> Am 02.10.23 um 20:08 schrieb Kees Cook:
>>> On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian K?nig wrote:
>>>> Am 02.10.23 um 18:53 schrieb Kees Cook:
>>>>> On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote:
2023 Oct 02
1
[PATCH 0/9] drm: Annotate structs with __counted_by
On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian K?nig wrote:
> Am 02.10.23 um 20:08 schrieb Kees Cook:
> > On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian K?nig wrote:
> > > Am 02.10.23 um 18:53 schrieb Kees Cook:
> > > > On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote:
> > > > > On Mon, Oct 2, 2023 at 5:20?AM Christian K?nig
>
2023 Oct 02
1
[PATCH 0/9] drm: Annotate structs with __counted_by
On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian K?nig wrote:
> Am 02.10.23 um 20:08 schrieb Kees Cook:
> > On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian K?nig wrote:
> > > Am 02.10.23 um 18:53 schrieb Kees Cook:
> > > > On Mon, Oct 02, 2023 at 11:06:19AM -0400, Alex Deucher wrote:
> > > > > On Mon, Oct 2, 2023 at 5:20?AM Christian K?nig
>