Displaying 20 results from an estimated 30000 matches similar to: "Data matrix of all possible response patterns"
2009 May 07
1
paste with apply, spaces and NA
Hello everyone,
I've come up with a problem with using paste() inside apply() that I
can't seem to solve.
Briefly, if I'm using paste to collapse the rows of a data frame, AND
the data frame
contains strings with spaces, AND there are NA values in subsequent
columns, then
paste() introduces spaces. This only happens with that particular combination of
data values and commands. I have
2012 Dec 13
3
Repeat elements of matrix based on vector counts
I have two dataframes (df) that share a column header ("plot.id"). In the
1st df, "plot.id" records are repeated a variable number of times based on
the number of trees monitored within each plot. The 2nd df only has a
single record for each "plot.id", and contains a variable named "load" that
is collected at the plot-level and is only listed once per plot
2012 Feb 02
4
an unusual use for R
I thought some of you might be amused by this.
In my non-work time, I'm an avid weaver and teacher of weaving. I'm
working on a project involving creating many detailed weaving
patterns, so I wrote R code to automate it.
Details here:
http://stringpage.com/blog/?p=822
If the overlap between R users and avid tablet weavers turns out to be
>> 1, I'll polish it up and turn it
2010 Mar 23
2
Adding matrix rows that have the same name?
Does anyone know if there is an R function that will take a matrix like this
jim 1 0 0 0 0 0
jim 0 1 0 0 0 0
jim 0 0 1 0 0 0
bob 1 0 0 0 0 0
bob 0 0 1 0 0 0
harry 0 0 1 0 0 0
harry 0 0 0 1 0 0
harry 0 0 0 0 1 0
harry 0 0 0 0 0 1
and make it like this? (that is, add together rows that have the same name?)
jim 1 1 1 0 0 0
bob
2012 Jun 07
1
table function in a matrix
Hi,
I am trying to get a summary of the counts of different variables for each sample in a matrix of the form "m" below to generate an output as shown. (Ultimately I want to generate a stacked barchart for each sample). I am only able to get the "table" function to work on one sample (column) at a time. Any help appreciated.
Thank you
Sarah
a<-c("A",
2009 Sep 15
0
Rsync preserve owner/permissions
Hello
I have setup a mirror script on our network, and I have some problem to
preserve ownership of the files transferred.
This problem is causing me a bit of headache as this file transfer is
for some production file, where if there is not the right
permission/ownership the program crashes, and it keep crashing.
I am overcoming the problem by defining manually the ownership as
2012 Mar 28
2
How to create arbitrary number of loops
Dear R users,
I'm wondering how I can generate an arbitrary number of loops in R.
For instance, I can generate two "for" loops to get ICC among any two-way combination among 10 variables. Here is the code
n<-10
for (i in 1:(n-1))
{
for (j in (i+1):n)
{
icc(cbind(DATA[,i],DATA[,j]))
}
}
If I need three-way combination, then a code with three "for" loops will be:
2012 Jun 11
2
replacing values of matrix with random values of another dataframe
Hello,
I'm having trouble performing a certain function within R and I was hoping
someone might be able to help. I have a matrix (1000x21) that contains
whole-number values ranging from 1-7 and I want to replace all entries
within this matrix that have a value of 1 with a random number contained
within a different dataframe that has 21 rows,1000 columns. I've tried
using the if/else
2018 Mar 17
0
length of 'dimnames' [2] not equal to array extent- For Correlation Plot
That does clarify for me that you're missing a step: I didn't clearly
follow your description at first.
corrplot expects a correlation matrix, not your original data. You need to
use cor() first.
That's pretty clear in the documentation. See for instance the examples:
data(mtcars)
M <- cor(mtcars)
corrplot(M)
Sarah
On Sat, Mar 17, 2018 at 12:00 PM Shivi Bhatia <shivipmp82 at
2013 Jan 07
1
try()-function does not catch error in BATCH-job if Matrix is loaded
Hello,
In my simulation I use the try()-function to catch possible errors when
fitting models. I run the simulationon a Linux-server using the command
" R CMD BATCH nameOfFile.R &". When executing the code as batch-job I
get the problem that the execution is halted without giving an error
message. But when I run the code interactivly the error is catched by
try() as it would
2013 Sep 13
1
Change mail_location for one user?
Hello, I'm running the latest version of dovecot on Linux with mbox
mailboxes. Everything works fine. So in my dovecot config I have
mail_location = mbox:~/mail:INBOX=/var/mail/%u
I would like to now change the mail_location for one user in an attempt
to slowly migrate to Maildir format. I'm confused how to do this. I'm
running shadow passwords:
$: doveconf -n passdb
passdb {
2016 Apr 15
1
Decision Tree and Random Forrest
I need the output to have groups and the probability any given record in
that group then has of being in the response class. Just like my email in
the beginning i need the output that looks like if A and if B and if C then
%77 it will be D. The examples you provided are just simply not similar.
They are different and would take interpretation to get what i need.
On Apr 14, 2016 1:26 AM,
2011 Jul 29
3
help with plot.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",",
header = TRUE)
? library(rpart)
? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT)
Please: Show me the tree.
Mark
-------- Original Message --------
Subject: Re: [R] help with rpart
From: "Stephen Milborrow" <[1]milbo at sonic.net>
2016 Apr 14
3
Decision Tree and Random Forrest
I still need the output to match my requiremnt in my original post. With decision rules "clusters" and probability attached to them. The examples are sort of similar. You just provided links to general info about trees.
Sent from my Verizon, Samsung Galaxy smartphone<div>
</div><div>
</div><!-- originalMessage --><div>-------- Original message
2016 Apr 15
0
Decision Tree and Random Forrest
Since you only have 3 predictors, each categorical with a small number of
categories, you can use expand.grid to make a data.frame containing all
possible combinations and give that the predict method for your model to
get all possible predictions.
Something like the following untested code.
newdata <- expand.grid(
Humidity = levels(Humidity), #(High, Medium,Low)
2018 Mar 17
3
length of 'dimnames' [2] not equal to array extent- For Correlation Plot
Hi Sarah,
Thank you for your help.
I tried using CR1<-as.matrix(CR1) but gives error Error in corrplot(CR1,
method = "circle") : The matrix is not in [-1, 1]!. I am using a corrplot
library.
Please find the reproducible example:
dput(head(CR1,10))
structure(c(26L, 46L, 39L, 38L, 47L, 59L, 56L, 61L, 43L, 60L,
78L, 63L, 2L, 58L, 8L, 1L, 1L, 9L, 11L, 2L, 1037500L, 46747L,
346300L,
2008 Jan 02
1
wants to get all parents with no children, etc
To all:
hi,
i have implemented the associations in my models
so i have a Parent model that has many Children model
but i need to get a list of Parents that do not have children
or
Parents that have just 2 children
or Parents that have children whose name is ''James'', or ''Sarah'', or
''Betty''
or Parents whose children do not have names like
2009 Apr 29
0
[LLVMdev] Building LLVM 2.5 on CENTOS 5.3
Just to give closure here, I eventually gave up, built an Ubuntu 9
VMWare image which uses gcc 4.3.2 by default, installed Eclipse
Ganymede and various other tools, then built LLVM 2.5 and my own code.
It all ran fine. There is clearly something broken in the CentOS gcc43
package. Definitely one to avoid.
[s]
On Apr 28, 2009, at 5:40 PM, Sarah Thompson wrote:
> (My script does both
2007 Mar 23
0
[LLVMdev] June 2007 LLVM Developer's Meeting
Hi Sarah,
On Fri, 2007-03-23 at 15:11 -0700, Sarah Thompson wrote:
> I'll almost certainly come along, possibly with one or two other NASA
> people.
Great! If/when you know their names, have them drop me a line here. I'd
rather put down names than "Sarah+2". Thanks.
> I could give a talk on our work using LLVM to support model
> checking, symbolic execution and
2012 Jul 06
2
Maximum number of patterns and speed in grep
Hi,
I am using R's grep function to find patterns in vectors of strings. The
number of patterns I would like to match is 7,700 (of different sizes). I
noticed that I get an error message when I do the following:
data <- array()
for (j in 1:length(x))
{
array[j] <- length(grep(paste(patterns[1:7700], collapse = "|"), x[j],
value = T))
}
When I break this up into 4 chunks of