Displaying 20 results from an estimated 1200 matches similar to: "kmeans and plot labels"
2013 Jun 27
1
corrgram with two datasets
Hi,
I would like to display inter-parameter scatter plots like those with the corrgram package (see upper triangle here: http://www.statmethods.net/advgraphs/images/corrgram2.png ), just that I would like to plot two datasets instead of one. Say one with black and one with red dots. Or a merged dataset where an indicator column is used to assign different colors to particular dots - with still
2011 Dec 13
1
k-means cluster and plot labels
Hi,
For my data, I followed the example of http://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Clustering/K-Means#Execution and got some very nice results. Despite the fact, that I want to achieve a bit more by clustering my data (stratification beyond case-control), the actual data-frame contains a column labeled "C" which holds a case-control indicator (here either "Z"
2011 Jul 11
2
problem with 'predict'
Hi,
I would like to tabulate the likelihood for an affection. For this, I retrieve indices of affected people and controls for my data set and proceed as follows:
flags <- c(rep(1, length(patient_indices)), rep(0, length(control_indices)))
# dataset is a data.frame and param the parameter to be analysed:
data1 <- dataset[,param][c(patient_indices, control_indices)]
fit1 <- glm(flags ~
2011 Jun 09
1
what is the mistake?? the coding still not function. no result display
# lda.r
> #
> # Author: Amsha Nahid, Jairus Bowne, Gerard Murray
> # Purpose: Perform Linear Discriminant Analysis (LDA)
> #
> # Input: Data matrix as specified in Data-matrix-format.pdf
> # Output: LDA plot
> #
> # Notes: Missing values (if any) are replaced by the half of the lowest
> # value in the entire data matrix.
>
2011 Jun 21
1
(no subject)
hello,
i already include the error in blue color word.
i hope it can help you to understand my question.
if not burden you, please give me a guide how to correct the error or maybe you
can correct the coding cause error.
thank you.
> # lda.r
> #
> # Author: Amsha Nahid, Jairus Bowne, Gerard Murray
> # Purpose: Perform Linear Discriminant Analysis (LDA)
> #
> #
2017 Nov 21
2
mystery "158"
This is a simple problem, but a mystery to me.
I'm trying to grab $Family "Scelionidae" from one dataframe and put it into
another dataframe occupied with NA in $Family. The result is a "158" ends
up there instead of Scelionidae.
Simply put fam$Family[1] <- least$Family[1]
If I have made a mistake here, can somebody point it out. I've included
the simple
2005 Jun 16
1
how to use plot.lda included in MASS package?
Hi there,
I am a master student in Denmark, and apply R to analyze the drug data.
I use the function 'lda' to obtain a linear discriminant object, and
then wish to use 'plot.lda' to do the plot on this object like below.
drug.lda <- lda(Inhibition ~ NET_CHARGE + PKA_1 + MW + MLOGP,
data = drug.class, method = "moment")
plot.lda(drug.lda,
2017 Nov 21
0
mystery "158"
Your data frame fam contains factors. Turn it into character strings using
fam$Family = as.character(fam$Family)
and try again. It may be helpful if you read up on R's factors, see ?factor.
HTH,
Peter
On Tue, Nov 21, 2017 at 2:14 PM, Glen Forister <gforister at gmail.com> wrote:
> This is a simple problem, but a mystery to me.
> I'm trying to grab $Family
2004 May 24
1
discriminant analysis
Hi,
I have done different discriminant function analysis of multivariat data. With the CV=True option I was not able to perform the predict() call. What do I have to do? Or is there no possibility at all? You also need the predicted values to produce a plot of the analysis, as far as I know.
Here my code:
pcor.lda2<-lda(pcor~habarea+hcom+isol+flowcov+herbh+inclin+windprot+shrubcov+baregr,
2017 Nov 22
1
mystery "158"
Well, ?factor does not say anything about this behaviour (assigning numeric code instead of level of factor). And actually if you do assignment for whole vector the result is different (vector in data frame is changed to factor).
> temp2$fff[1]<-vec[1]
> head(temp2,2)
pokus minuty fff
1 T42 240 3
2 T42 300 <NA>
> temp2$fff<-vec
> head(temp2,2)
pokus
2004 Nov 02
2
lda
Hi !!
I am trying to analyze some of my data using linear discriminant analysis.
I worked out the following example code in Venables and Ripley
It does not seem to be happy with it.
============================
library(MASS)
library(stats)
data(iris3)
ir<-rbind(iris3[,,1],iris3[,,2],iris3[,,3])
ir.species<-factor(c(rep("s",50),rep("c",50),rep("v",50)))
2009 Aug 05
1
Decision boundaries for lda function?
Hi,
I am using the lda function from the MASS library. I would to find the
decision boundaries of each class and subsequently plot them. I wonder if
anybody can offer any help on this topic?
Below I applied the lda function on a small dataset of mine.
Any help will be much appreciated.
> library(MASS)
>
2005 Mar 29
2
strange error with rw2010dev
With rw2010dev I get a strange protect(): protection stack overflow
error with a small data frame which otherwise is usable:
If anybody wants to have a look I can provide an RData file
with the problematic data frame.
Doesn't seem to be necessary, the following simulated example
generates the error:
> testmat <- matrix(1:80, 20,4)
> dim(testmat)
[1] 20 4
> str(testmat)
int
2011 May 25
1
matrix Manipulation...
Hello everyone,
I have a 2 x 5 matrix: say
0.2 0.3 1 -1 3
0.2. 0.4 5 0.5 -1
I want to replace all the values greater than or equal to 1 with 1 and those
less than or equal to 0 with 0. So I should end up with a mtrix looking
like:
0.2 0.3 1 0 1
0.2. 0.4 1 0.5 0
Any ideas how to do this?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
2001 Aug 30
1
imagenrgb: Function to display RGB images in R
I've writen this function (imagenrgb)
to display a (m,n,3) array
as a RGB image with ngris^3 colors and,optionally,
stretching. If option ver=F, it does not
display but saves a pseudocolor version of the image
as a list (so that subsequent displays are faster).
I'd appreciate feedback and improvements
and hope that it's useful for others.
Example of use:
> dim(imatest)
[1] 100
2010 Nov 18
1
dmultinomial
Hello All,
I'm trying to run a maximum likelihood analysis using dmultinomial (i'm
avoiding dmultinom as I'd like to run it with vectors for the ML stuff).
However, I'm having a hard time getting even the simplest example
running. Any help would be greatly appreciated.
> library(mc2d)
> dmultinomial(x=c(0,0,1),prob=c(1,1,1),size=1,log=TRUE)
Error in if (ncol(x) != K)
2011 Jun 09
0
(no subject)
> #
>> # Generate the figures (on screen)
>> #
>> # Image generation - function definition
>> pic_onscr<-function(matrix, title, cex_val=1)
> + {x11() + par(mgp=c(5,2,0), # axis margins + # (title,
> labels, line) + mar=c(7,4,4,2), # plot margins (b,l,t,r) +
> las=1) # horizontal labels + plot(matrix, # data to plot +
>
2010 Oct 22
3
Conditional looping over a set of variables in R
Here's the problem I'm trying to solve in R: I have a data frame that consists of about 1500 cases (rows) of data from kids who took a test of listening comprehension. The columns are their scores (1 = correct, 0 = incorrect, . = missing) on 140 test items. The items are numbered sequentially and are ordered by increasing difficulty as you go from left to right across the columns. I want
2017 Aug 09
2
generating cran package list matching R minor version
Dear All,
It is a common problem to update R for distributors. My challenge is to
maintain R module files for a cluster, using easybuild.
My question is: Is there a way to derive a list of cran packages and
their version for a given version of R?
In case addressing the R-help list is addressing wrong list, any pointer
is appreciated.
Best regards,
Christian Meesters
2010 Dec 13
7
descriptive statistics
Hi. In a data set I have a variable that takes values from 1 to 14. For each
subgroup of values of this variable, I would like to obtain some descriptive
statistics of other variables present in the data set. I've been trying with
a "for" loop but I couldn't get nothing. Could you please suggest me some
lines?
--
View this message in context: