?subset
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#..
On 14/11/2012 23:10, BayesForever wrote:
Is there a reference guide to the complete set of functions and their
arguments that are available in the R.dll library for Windows, i.e. the set
of functions that includes Rf_initEmbeddedR and Rf_endEmbeddedR listed
in section 8.2.2 of the Writing R
Dear Rolf,
You are of course quite right, however I wish the diagonal to be
ignored by setting the value to zero. The inf was just recognising the
flow value from self to self.
A very fair point though.
Best,
Nick
On 15 November 2012 04:10, Rolf Turner rolf.tur...@xtra.co.nz wrote:
On 15/11/12
Dear All,
I would like to extract Lambda Sets from a binary matrix that
represents a social network.
The calculation of Lambda Sets is set out in Borgatti 1990 (which can
be downloaded freely).
The package SNA goes part of the way with the function MaxFlow but
does not have the Lambda
Hello all,
I have the following problem:
1) A list was defined as 'a'
a - list(var1=c(100:1), var2=c(1:100), var3=rnorm(100))
2) a function 'foo' was defined that extracts the variable name assigned to x
using the deparse(substitute()) functionality. This name will then be used
within the
On 15-11-2012, at 11:14, Gaj Stan (BIGCAT) wrote:
Hello all,
I have the following problem:
1) A list was defined as 'a'
a - list(var1=c(100:1), var2=c(1:100), var3=rnorm(100))
2) a function 'foo' was defined that extracts the variable name assigned to x
using the
Hello Berend,
Thanks for your quick response.
I am aware of the names() function, but this is not the answer to my question,
since it will not work within the foo function.
Let me try to explain it again! (:
I want to analyze several datasets in a similar fashion and stored all data as
What I do not understand is how SAS knows where the variables begin and
end.
I managed to break off a little hunk of the beginning of my file and look
at
it in an editor, and it is numbers without any obvious delimiters. Is the
delimiter a particular numeric string? I thought the SAS command
I want to get access to the code of an S4 method in order to possibly modify
a function to accomplish my particular needs: in my case the function in is
cenfit() from the package NADA
Now, given my reproducible example:
my.ex-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.0072), LR =
Hi
your model
f - function(x,a,b) {a * I(x^b)}
can be expressed as
log(a)+b*log(x)
and for that it shall result in straight line and you can use lm for estimate
of b and log(a)
It is also better to use 1:33 instead of 1980:2012
Based on values you get from linear realation you can set
Use the col= argument to the heatmap() function to specify the three
colors you want. For example:
x - matrix(rnorm(50), ncol=5)
heatmap(x, col=1:3)
Jean
furor furor1...@gmail.com wrote on 11/14/2012 03:31:42 AM:
Hi all,
I've made a heatmap using '-', '=' and '+' as
Hi,
Your reproducible example isn't reproducible for me, as I get an error message.
But regardless, the easiest thing to do is write your own wrapper,
something like:
mycenfit - function(x, y) {
result - cenfit(x, y)
c(result, sum = result$n * result$mean)
}
No need to change anything in
THE ERROR WAS :
ERROR: compilation failed for package 'base64'
Problem is with version.
Any idea, how can we do this without any packages ?
- Thanks
Antony.
--
View this message in context:
http://r.789695.n4.nabble.com/Send-Email-from-R-tp4645565p4649585.html
Sent from the R help
Hi
I'm trying to install R-2.15.2 in Unix environment and when i run
./configure i'm getting the following error
configure: error: --with-x=yes (default) and X11 headers/libs are not
available.
i just unzip .tar file and ran ./configure. I'm not able to get x11()
anywhere.
Please help me
Hi R users,
Iwant to run a model, but want to know previously if my data present
homoscedascity:
the model is something like this:
glm(ax~a*b*c*d)
I´ve found four different ways to test for homoscedascity, but i want to
know which is correct:
1.-fligner.test(glm(x~a*b*c*d))
2.-
I want to make a chart on variables which are taken in 2 different years on 2
the same locations, at different depths, where for every location the
species and the amount of species are determined.
The first chart I want to make is to see how much of every species is
collected in total in a bar
Hi everyone,
I have a data frame one of whose columns is a character vector and the rest
are numeric, and in debugging a script, I noticed that an ifelse call seems
to be coercing the character column to a numeric column, and producing
unintended values as a result. Roughly, here's what I tried
No this doesn't seem like what I want.
As you can see in the dataset sometimes there are the same species on
different locations. First I want to make a chart on how many of a single
species there are in this dataset and preferrably for all species in one
chart.
Second I want to make such a
Uwe, I set the variable with single backslashes, but the output remains the
same. The last part reads:
gcc -m64 -shared -s -static-libgcc -o RMySQL.dll tmp.def RS-DBI.o
RS-MySQL.o C:\Program Files\MySQL\MySQL Server 5.5/bin/libmysql.dll
-Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64
Hi all,
Sorry if this has been answered already, but I couldn't find it in the
archives or general internet.
Is it possible to implement the gompertz distribution as
survreg.distribution to use with survreg of the survival library?
I haven't found anything and recent attempts from my side
Its not scaling.. so..
I guess i'll stay severely frustrated, and yes i know this is probably not
enough information for anyone to help.
Still, talking helps ;)
On 15.11.2012, at 15:15, Jessica Streicher wrote:
with
pred.pca-predict(splits[[i]]$pca,trainingData@samples)[,1:nPCs]
Dear all,
i have microarray data of 3 classes of patients. It's not a time course
experiment only steady state.
I used a rule-based method to classify the groups by the expression of the
genes. This works out so far. Nevertheless I want to check my results with an
other method. Therefore I look
Then you need to install the x11 headers for your Unix (linux?)
system. I can't tell you what or how without knowing more about your
particular setup.
By far the easiest thing to do if you're not familiar with compiling
your own software, headers and such, is to install the binary for your
linux
sorry sarah
you are right, my fault, this is the correct reproducible example
(a misinterpretation of LR type occurred in previous reproducible example)
my.ex-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.0072
), LR = c(FALSE, FALSE, TRUE, FALSE, TRUE, FALSE)), .Names = c(TEC,
LR),
Thanks for the clarification, Martin. Since I couldn't reproduce the
example, I didn't get to see what was actually being returned (and
was, admittedly, too lazy to dig through the help).
library(NADA)
my.ex-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.0072), LR =
+ c(0L, 0L, 1L,
with
pred.pca-predict(splits[[i]]$pca,trainingData@samples)[,1:nPCs]
dframe-as.data.frame(cbind(pred.pca,class=isExplosive(trainingData,2)));
results[[i]]$classifier-ksvm(class~.,data=dframe,scaled=T,kernel=polydot,type=C-svc,
Now i let it run for one specific set and got the same bad result, then i
deactivated the probabilities and got a good result, then i activated the
probabilities again and got a good result .. huh???
On 15.11.2012, at 15:32, Jessica Streicher wrote:
Its not scaling.. so..
I guess i'll
On 11/15/2012 06:10 AM, Sarah Goslee wrote:
Hi,
Your reproducible example isn't reproducible for me, as I get an error message.
But regardless, the easiest thing to do is write your own wrapper,
something like:
mycenfit - function(x, y) {
result - cenfit(x, y)
c(result, sum = result$n *
On 15/11/2012 11:49, R_Antony wrote:
We had no context. This is R-help, not a Nabble forum.
THE ERROR WAS :
ERROR: compilation failed for package 'base64'
Problem is with version.
Any idea, how can we do this without any packages ?
Does searching not work for you? ??email returned
On 15/11/2012 14:28, Sarah Goslee wrote:
Then you need to install the x11 headers for your Unix (linux?)
system. I can't tell you what or how without knowing more about your
particular setup.
But note that the manual does cover a lot of the possibilities.
From the INSTALL file:
'The main
Hi
I am trying to recover the hessian of a problem optimised with
box-constraints. The problem is that in some cases, my estimates are very
close to the boundary, which will make optim(..., hessian=TRUE) or
optimHessian() fail, as they do not follow the box-constraints, and hence
estimate the
Hi Jim,
thanks again for your support.
Yes, I meant the subject codes; I will add a new variable and set the color to
white all over.
Thanks,
Michele
On Nov 15, 2012, at 1:13 AM, Jim Lemon wrote:
On 11/15/2012 07:21 AM, michele caseposta wrote:
Back again.
Is there a quick way to add the
Hi Stan,
On Thu, Nov 15, 2012 at 6:02 AM, Gaj Stan (BIGCAT)
stan@maastrichtuniversity.nl wrote:
Hello Berend,
Thanks for your quick response.
I am aware of the names() function, but this is not the answer to my
question, since it will not work within the foo function.
Let me try to
Hi Jessica,
Talking may help you, but it's kind of a waste of time for the
thousands of readers of R-help unless you provide a reproducible
example and full context. We'd like to help, but can't without
adequate information.
Sarah
On Thu, Nov 15, 2012 at 9:48 AM, Jessica Streicher
Bad scaling will waste a lot of everyone's time.
I put the data in a data frame mdat, then
library(nlmrt)
mdat-read.csv(muzzamil.csv, header=T)
fmn - nlxb(y~a * (x^b), data=mdat, start=c(a=1,b=1), trace=T)
fm - nls(y~a * (x^b), data=mdat, start=c(a=1,b=1), trace=T)
fmn2 - nlxb(y~a2 *
Thanks for the suggestion, Bert; I just re-read the introduction with
particular attention to the sections you mentioned, but I don't see how any
of it bears on my question. Namely -- to rephrase: What constraints are
there on the form of the yes and no values required by ifelse? The
Ok, this is my finally (hopefully) clean session
my.ex-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.0072), LR =
c(FALSE, FALSE, TRUE, FALSE, TRUE, FALSE)), .Names = c(TEC,LR),
row.names = c(NA, -6L), class = data.frame)
library(NADA)
xx-with(my.ex,
cenfit(TEC,LR)
)
David:
You seem to be getting lost in basic R tasks. Have you read the Intro
to R tutorial? If not, do so, as this should tell you how to do what
you need. If so, re-read the sections on indexing ([), replacement,
and NA's. Also read about character vectors and factors.
-- Bert
On Thu, Nov 15,
Vijayan:
Choose one or both from the following.
1. You don't . R is a programming language that you learn. Read the
Intro to R Tutorial to start learning.
2. See the R GUI page on CRAN here: http://www.sciviews.org/_rgui/
There are several GUI's available for R and you can choose one that
I'll try .. lets see
dput(dframe)
structure(list(PC1 = c(-112.131127281872, -116.596689350263,
-128.974817313418, 1196.74257699487, 1216.80975908625, -162.017759589637,
-85.3191578683763, -130.528496524968, -6.27985683466795, -110.832877061623,
-127.466759201992, -106.169095838249,
Hi,
df1-read.table(text=
col1 col2 col3
A 15.5 8.5
A 8.5 7.5
A NA NA
B 8.0 6.0
B NA NA
B 9.0 10.0
,sep=,header=TRUE,stringsAsFactors=FALSE)
str(df1)
#'data.frame': 6 obs. of 3 variables:
# $ col1: chr A A A B ...
# $ col2: num 15.5 8.5 NA 8 NA 9
# $ col3: num
Dear Gurus,
Thank you in advance for your assistance. I'm trying to understand scope better
when performing stepwise regression using step. I have a model with a binary
response variable and 10 predictor variables. When I perform stepwise
regression I define scope=.^2 to allow interactions
Sorry - CSR = Complete Spatial Randomness.
--
View this message in context:
http://r.789695.n4.nabble.com/Confidence-intervals-in-Ripley-s-K-function-a-little-challenge-tp4649392p4649597.html
Sent from the R help mailing list archive at Nabble.com.
Hello,
If I have a series of numbers, and I want to find the level (the lowest
value) on which each series is becam significant in the meaning of of
frequency. In other words, how to find the value of lowest point (number)
which is not an outlier?
Thanks in advance
Przemek
--
View this
Hi @ all,
I wamnt to combine two dataframes including a condition.
I have two dataframes like the following:
animal-c(bear,bear,lion,monkey,fish,monkey,bear,zebra,zebra)
val-c(2,42,67,5,12,9,87,1,12)
place-c(S,N,N,Z,R,O,E,I,Q)
df1-data.frame(animal,val,place)
HI,
If you need to separate into two datasets,
dat1[dat1$company==A,]
# weights company
#1 1 A
#2 2 A
#or
dat1[dat1$company==B,]
#or split into a list
split(dat1,dat1$company)
A.K.
- Original Message -
From: nilsonern nilson...@gmail.com
To:
Hi everyone, please put me off that list!!! The unsubscribe function does not
function...
THANKS!!!
BW Sonja
-Ursprüngliche Nachricht-
Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im
Auftrag von David Romano
Gesendet: 15 November 2012 12:19
An:
In a data frame, I would like to assign two or more factors to one
observation. Is it possible? If so, how?
Example: In the variable $ dishes, there are several levels: cup,
plate, saucer. In my first observation, I see a saucer only. But in
the second one, I see a cup and a saucer. In the
On Thu, Nov 15, 2012 at 7:49 AM, sbarandiaran sbaran...@gmail.com wrote:
Uwe, I set the variable with single backslashes, but the output remains the
same. The last part reads:
gcc -m64 -shared -s -static-libgcc -o RMySQL.dll tmp.def RS-DBI.o
RS-MySQL.o C:\Program Files\MySQL\MySQL Server
Hello R-help team,
I seek your help (for what is most likely a very simple problem). I'm new
to Ubuntu and tried to install R using the Ubuntu Software Center. However,
after clicking the install command, I always get prompted with the error
Failed to download package files --- check your
Replace your NA's column by column, not all at once.
In your first example, of the form
ifelse(condition, numbers, data.frame)
the second and third arguments are replicated to the length
of the first. A data.frame's length is the number of columns
it has, so ifelse repeats its columns, not
Guess it has something t do with the values in prob.model. The classifiers with
bad predicitons have positive values and the ones with good predictions have
negative values.
On 15.11.2012, at 17:18, Jessica Streicher wrote:
I'll try .. lets see
dput(dframe)
structure(list(PC1 =
Is this what you want:
animal-c(bear,bear,lion,monkey,fish,monkey,bear,zebra,zebra)
val-c(2,42,67,5,12,9,87,1,12)
place-c(S,N,N,Z,R,O,E,I,Q)
df1-data.frame(animal,val,place)
animal-c(bear,bear,lion,monkey,fish,monkey,bear,zebra,zebra)
val-c(21,45,78,6,18,77,89,17,28)
Hi,
In my reading of pairing means of two independent samples, I read statements
such as the standard error of the meanof X1 minus the mean of X2 is the
square root of s1^2/n1+s2^2/n2. Then I read:
We could now derive the two independent samples confidence interval and
test statistic. However, a
On 2012-11-14 20:52, nilsonern wrote:
I am trying to do a two sample t-test with data that i received in a text
document. one list has the slab weights and the second has the company it
is associated with. here is an example.
weights company
1 A
2 A
2
On 2012-11-15 10:17, David Arnold wrote:
Hi,
In my reading of pairing means of two independent samples, I read statements
such as the standard error of the meanof X1 minus the mean of X2 is the
square root of s1^2/n1+s2^2/n2. Then I read:
We could now derive the two independent samples
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:
#Data
df-data.frame(id=letters[1:10],var1=rnorm(10,10,5),var2=rnorm(10,5,2),var3=rnorm(10,1,1))
#Missing
df$var1[2]-df$var2[c(2,6)]-df$var3[c(2,5)]-NA
na.replace-seq(1:ncol(df))-1
df[,names(df)]-sapply(1:dim(df)[2], function(ii)
{ifelse(is.na(df[,ii]),na.replace[ii],df[,ii])} )
David
On 15/11/2012 2:21 PM, C W wrote:
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
This is R FAQ 7.40, and that document gives some good pointers:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-access-the-source-code-for-a-function_003f
I prefer to simply download the source code version of the package
from CRAN, so that comments aren't stripped, but there are several
Hey,
It's actually not homework, what gave you that impression? I graduated in
May and studied Math, economics, and international relations, so I don't
have much of a programming background. This is a project that I'm working
on out of personal interest.
Obviously, I've tried doing some
Florian,
There are a number of different ways to handle data like this. Two that
come to my mind are shown below. You could allow each observation to be
represented by multiple rows in the data frame:
obs dishes
11 saucer
22cup
32 plate
42 saucer
53cup
63
Hello,
I want to use lag on a time variable but I have to take date into
consideration ie I don't want days to overlap ie:
I don't want my first time of today to match my last time of yeterday.
In SAS I would use :
data x;
set y;
by date tim;
previous=lag(tim);
if first.date then
thanks all. The mcmc:::foo is exactly what I am looking for.
On Thu, Nov 15, 2012 at 2:35 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote:
On 15/11/2012 2:21 PM, C W wrote:
Dear list,
I am trying to look at the function inside a package. I know that
methods() would do the trick, but what
You've included three I wants in your message, but no question.
Are you looking for functions? Try searching ... in R, on google, on
http://rseek.org/, ...
Have you tried some code, but can't get it to work? Send your code with
error messages, and tell us precisely what you trying to get
Hi - I am using R version 2.13.0. I have run several GLMMs using the glmmPQL
function to model the proportion of fish caught in one net to the total
caught in both nets by length. I started with a polynomial regression full
model with three length terms: l, l^2, and l^3 (l=length). The length
Hi Experts,I'm writing up my thesis on open source data mining at the moment
and I have to do some simple R experiments; however, I have very little
experience with R.. And I am hoping one of you can please help me out:)I
need need to run a regression task that uses the KNN algorithm with k = 5
Hello everyone,
I have a time serie created with the function ts(), starting in 2006/01 and
ending in 2011/01. If I want to use the same data of the firsts two years
of that serie in a new one that starts and ends in years later, say 2012/01
and 2013/12, how can I do it?
Thanks in advance!
--
Hello Peter,
I checked for the levels() and reorder(), but I can't make it work. R
classifies the Groups (factor) by alphabetical order, but I would just
like to make him understand that it is ordered (is.ordered()) in my data
frame.
Here is my code :
abs1-spleen*p1*p2*cd8
length(abs1) # = 13
Hi,
Not sure why you wanted to separate A and B for a two sample t-test.
dat1-read.table(text=
weights company
1 A
2 A
2 B
3 B
,sep=,header=TRUE,stringsAsFactors=FALSE)
t.test(weights~company,data=dat1)
# Welch Two Sample
It looks like you are trying to use the scan function to pause some script
being called with the source function until you provide user input.
To do this, you need to specify the argument file=stdin when scan runs
inside a process. EG scan(file='stdin', nmax=1). In my Linux terminal, at
least,
I have two issues.
1-I am trying to use morphology to identify gender. I have 9 variables, both
continuous and categorical. I was using two-step cluster analysis in SPSS
because two-step could deal with different types of variables. But the
output tells me that an animal is in cluster 1 or 2, it
I have two matrices, generated by R functions that I don't understand.
I want to confirm that they're the same, but I know that they have
different attributes.
If I want to compare the dimnames, I can say
identical(attr(tm, dimnames), attr(tmm, dimnames))
[1] FALSE
or even:
Hello all, could you please tell me how to create a 95 percent confidence
interval using R, if I have the next data:
blue
[1] 4 69 87 35 39 79 31 79 65 95 68 62 70 80 84 79 66 75 59 77 36 86 39
85 74
[26] 72 69 85 85 72
red
[1] 62 80 82 83 0 81 28 69 48 90 63 77 0 55 83 85 54 72 58 68 88
HI,
But, this replace second column NAs to 1. May be, the na.replace() should be
applied to df1[,-1]
df1-read.table(text=
col1 col2 col3
A 15.5 8.5
A 8.5 7.5
A NA NA
B 8.0 6.0
B NA NA
B 9.0 10.0
,sep=,header=TRUE,stringsAsFactors=FALSE)
df2-df1[,-1]
max(abs(x-y)) numerical tolerance of your choice
-- Bert
On Thu, Nov 15, 2012 at 11:52 AM, Jonathan Dushoff dush...@mcmaster.ca wrote:
I have two matrices, generated by R functions that I don't understand.
I want to confirm that they're the same, but I know that they have
different
Suppose I wanted to plot the barley data like this:
dotplot(variety ~ yield | year+ site, barley,
strip = strip.custom(style = 4))
The factor levels are far too long for that to be useful. I can
overcome that problem if I shorten the levels like this:
dotplot(variety ~
Hi,
I have a list:
tmp0 - list(a=1, b=2, c=3)
And I realize that I can append a NULL element to the end of this list, just by
writing:
length(tmp0) - 4
Now, the question is, how can I assign NULL to one of the existing list
elements without changing the length of the list?
Please note I am
tmp0 - list(a=1, b=2, c=3)
tmp0[b] - list(NULL) # single [, list(NULL), not double [[ and bare NULL
str(tmp0)
# List of 3
# $ a: num 1
# $ b: NULL
# $ c: num 3
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-Original Message-
From: r-help-boun...@r-project.org
Dear KitKat,
After installing R and reading some introductory material on getting
started with R you may want to check the CRAN task view on cluster analysis:
http://cran.r-project.org/web/views/Cluster.html
which has many useful references to all kinds and flavors of clustering
techniques,
Dear EJ,
The depmixS4 package has no forecasting or predict functions, but as you
note, the forecast distribution is a relatively straightforward function of
the parameters. The posterior function provides you with the probability
distribution over the states at the end of your sequence and the
On Nov 15, 2012, at 5:38 AM, Matthias Ziehm wrote:
Hi all,
Sorry if this has been answered already, but I couldn't find it in the
archives or general internet.
A Markmail/Rhelp search on: gompertz survreg ...brings this link to a reply
by Terry Therneau. Seems to address everything you
all.equal() will give some details on the differences between your objects.
If you don't care that some attribute will differ, either ignore all.equal's
output concerning it or remove it before giving the object to all.equal.
E.g., if you don't care about dimnames but do care about dimensions do
It might be a C code wrapped around.
-m
On Thu, Nov 15, 2012 at 8:21 PM, C W tmrs...@gmail.com wrote:
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
Try Prof. Wilkinson's recent blog entry:
http://darrenjw.wordpress.com/2012/11/10/keeping-r-up-to-date-on-ubuntu-linux/
On Thu, Nov 15, 2012 at 5:14 PM, Karel van Duijvenboden
viera...@gmail.com wrote:
Hello R-help team,
I seek your help (for what is most likely a very simple problem). I'm
Hello,
Try the following.
?boot::boot
x - scan(text=
4 69 87 35 39 79 31 79 65 95 68 62 70 80 84 79 66 75 59 77 36 86 39
85 74 72 69 85 85 72)
y - scan(text=
62 80 82 83 0 81 28 69 48 90 63 77 0 55 83 85 54 72 58 68 88 83 78
30 58 45 78 64 87 65)
diffmeans - function(x, i) mean(x[i, 1] -
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of ramoss
Sent: Thursday, November 15, 2012 11:56 AM
To: r-help@r-project.org
Subject: [R] Can you have a by variable in Lag function as in SAS
Hello,
I want to use lag on a
Hi Patrick
Not sure what you finally want to achieve but will this do?
I have reduced the size of the text to make them readible
dotplot(variety ~ yield | year+ site, barley,
strip = strip.custom(which.given = 2, style = 4,
factor.levels =
On 16/11/12 02:40, e-letter wrote:
Readers,
A data set comprises
A B C
10 6 .2
20 7 .4
30 8 .16
40 9 .0256
My requirement is to obtain the derivative for values of A with
respect to B, create a function in R and plot this derivative
Have a look at the package mclust.
Jose
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
Ingmar Visser [i.vis...@uva.nl]
Sent: 15 November 2012 21:10
To: KitKat
Cc: r-help@r-project.org
Subject: Re: [R] cluster analysis in R
Hi ,
I want to apply the following code fo my data with 400 predictors.
I was wondering if there ia an alternative way instead of typing 400 predictors
for the following code.
I really appreciate your help.
fit0-lm(Y~1, data= mydata)
fit.final- lm(Y~X1+X2+X3+.+X400, data=mydata) ???
Hi List,
I have used XML in R version 2.9.2. The code is working fine using Rv2.9.2
and its related XML package. Now I am using Rv2.13.1 and its related XML
package, but I get the following error:
Error in UseMethod(xmlName, node) :
no applicable method for 'xmlName' applied to an object of
Hi all
I'd like to launch rJava but get that error:
library(rJava) Error : .onLoad failed in loadNamespace() for 'rJava',
details:
call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared
object
'/home/cloudera/R/x86_64-redhat-linux-gnu-library/2.15/rJava/libs/rJava.so':
scatterplot() is autogenerating a regression and loess line. I want to remove
the loess line, but can only find samples for how to add it. I definitely do
not have code that adds it (see below), so I am puzzling...
scatterplot(Aroused ~ anxious | group,
data=data,
xlab=Aroused,
Hi,
May be this helps:
set.seed(232)
mat1-matrix(sample(1:100,80,replace=TRUE),ncol=8) #with 8 columns
dat1-data.frame(mat1)
names(dat1)[1]-Y
form1-as.formula(paste(Y~,paste(names(dat1)[2:8],collapse=+))) #should
change 8 to 400
fit.final-lm(form1,data=dat1)
fit.final
#Call:
#lm(formula =
I think that what you are looking for is:
all.equal(tm,tmm,check.attributes=FALSE)
But BEWARE:
m - matrix(1:36,4,9)
mm - matrix(1:36,12,3)
all.equal(m,mm,check.attributes=FALSE)
gives TRUE!!! I.e. sometimes attributes really are vital characteristics.
cheers,
Probably you just want
Y ~ .
where . means everything which doesn't appear elsewhere in the formula.
Michael
On Thu, Nov 15, 2012 at 8:45 PM, farnoosh sheikhi farnoosh...@yahoo.com wrote:
Hi ,
I want to apply the following code fo my data with 400 predictors.
I was wondering if there ia
HI,
You could try these:
tmp1-list(a=1,b=NA,c=3,d=NA)
lapply(tmp1,function(x) if(is.na(x)) NULL else x) #changing NA to NULL
#$a
#[1] 1
#
#$b
#NULL
#
#$c
#[1] 3
#
#$d
#NULL
#other case;
tmp2-list(a=1,b=3,c=4,d=5) #want to change list elements a, c to NULL
tmp3-lapply(tmp2,function(x)
Always look at the help page. If you type, in this case, ?scatterplot, you'll
see that all you need to add is the argument smooth=FALSE to omit the loess
line.
Jose
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
nprause
Thanks for all of these useful answers.
Thanks also to Ben Bolker, who told me offline that c() is a general
way to access the main part of an object (not tested).
I also tried:
identical(matrix(tm), matrix(tmm))
[1] TRUE
which also works, but does _not_ solve the problem Rolf warns about
1 - 100 of 117 matches
Mail list logo