This is OT here. However, you might want to investigate the UNIQUE keyword in
the SQL Server documentation for SELECT.
---
Jeff NewmillerThe . . Go Live...
arunkumar wrote
Hi
I need help in the recursive problem. this is my code
#Generate two random Numbers
minval=20
maxval=100
cutoffValue=50
optVal- function(cutoffValue,minval,maxval)
{
x=runif(2)
x=x*cutoffValue
for( i in 1:2)
{
if(x[i] 30 || x[i] 60)
On Jan 09, 2012 at 11:48am Christoph Liedtke wrote:
I should be detecting some non-significance between groups I and III at
least, but the test comes back with
extremely low p-values. Where am I going wrong?
Nowhere, I think. This does seem to be an error in coin. You should send
your
try:
SELECT a.UNIQUE_ID,
a.diag01
from LoadPUS a
left join CVD_ICD10 b
on a.diag01 = b.[ICD-10 Codes]
or a.diag02 = b.[ICD-10 Codes]
or a.diag03 = b.[ICD-10 Codes]
I am not sure why your table name CVD_ICD10 has a suffix $.
From: Jeff
Hi Adrian,
I can not see any reference about scanmeasure and deviation functions in
the current spatstat manual: are these included in the newest version of
spatstat?
Mathieu
2012/1/9 adrian.badde...@csiro.au
The following message appeared on R-help but this discussion should be
moved to
Dear all,
I am doing a simulation for my model that works when I use only the rq()
command. However, since I need to use the varcov matrix for my Wald test, I
need to compute summary(rq(), cov=TRUE). But the simulation does not work
because of the error: tau + h 1: error in summary.rq
I
Specifying xlim or ylim in the mapCountryData function of the rworldmap library
do not alter the plotting region on my system.
#Using the example from rworldmap
library(rworldmap)
mapCountryData() #uses the sample dataset
mapCountryData(ylim = c(-45,45)) #makes no difference to the plot
R
Any ideas what is the problem with this code?
N - 2; c(Sys.Date(), sprintf('N = %d', N))
[1] 2012-01-10 NA
Warning message:
In as.POSIXlt.Date(x) : NAs introduced by coercion
Best regards,
Ryszard
Ryszard Czerminski
AstraZeneca Pharmaceuticals LP
35 Gatehouse Drive
Waltham, MA 02451
USA
Hello,
I was using version 2.13.2 and I have just downloaded the latest version
2.14.1. However, I'm trying to install the packages I was using and when I
look for them in the packages list, I can´t find many in the CRAN binaries
(e.g. vegan). I do find them in the CRAN sources but the
I can able to calculate the propensity score using classification tree
method.
And if i am trying to find the PS matching i am getting error.(Error in
Match(Y = Y, Tr = Tr, X = ps0) : length(Y) != length(Tr))
Propensity score matching:
library(rgenoud)
library(Matching)
data(Passport)
A single tree will undermatch subjects.
Frank
ardsiiitmg wrote
I can able to calculate the propensity score using classification tree
method.
And if i am trying to find the PS matching i am getting error.(Error in
Match(Y = Y, Tr = Tr, X = ps0) : length(Y) != length(Tr))
Propensity score
The packages you require might not have been updated yet. You could contact the
package admin.
Gavin.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of natalia norden
Sent: 10 January 2012 13:35
To: r-help@r-project.org
Subject:
On 12-01-10 8:04 AM, Czerminski, Ryszard wrote:
Any ideas what is the problem with this code?
N- 2; c(Sys.Date(), sprintf('N = %d', N))
[1] 2012-01-10 NA
Warning message:
In as.POSIXlt.Date(x) : NAs introduced by coercion
You are trying to create a vector combining a Date object and a
I was sent a copy of the data on request. A quick look shows that
range(days.alive[censored==0])
[1]0 1825
range(days.alive[censored==1])
[1] 1826 1826
The original call of survdiff(Surv(days.alive, censored) ~ group) will
assume that censored=1 corresponds to deaths and 0 to alive;
On Jan 10, 2012, at 8:45 AM, Gavin Blackburn wrote:
The packages you require might not have been updated yet. You could
contact the package admin.
That would not be the first option. Checking to see if your mirror is
deficient by looking at another mirror would be the first option. You
Hi @ all,
I have question how to mark significant outliers in R.
This is my very simple script to plot a regression:
TOC_NI-read.csv2(C:/Users/XYZ/Desktop/Master/Daten/Statistik/TOC-NI.csv,
sep=;, dec=,, encoding=UTF-8)
plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450))
Trying to install latest rjags (3-5) from CRAN with JAGS 3.2.0
installed on Ubuntu 10.04, with r-devel ... the bottom line is that it
fails while loading with
/libs/rjags.so: undefined symbol: _ZN7Console15checkAdaptationERb
Has anyone else seen this or is it a glitch somewhere in my
# find top 4 points
circ
-
TOC_NI[order(TOC_NI$NI,decreasing=T),][1:4,]TOC_NI[order(TOC_NI$NI,decreasing=T),][1:4,]
# add them to your plot!
plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450))
abline(lm(NI~TOC,data=TOC_NI),col = red,lwd=3)
I am getting the following erro rmessage in ordistep. I have a number of
similarly structured datasets using ordistep in a loop, and the message only
occurs for some of the datasets.
I cannot include a reproducible sample - the specific datasets where this is
occur ing are fairly large and
Dear everyone,
I have looked all over the internet but I cannot find a way to solve my problem.
In my data I want to sum a couple of variables. Some of these
variables have NA values, and when I add them together, the result is
NA
dat - data.frame(
id = gl(5,1),
var1 = rnorm(5, 10),
var2 =
Dear Sir/Madam,
I want to download R development version 2.15.0 source code. But I just found
the version for windows and MacOS. So would you please give me some instruction
about how can I download the R 2.15.0 source code? Thank you very much for you
help!
Best,
Jing Wang
Hi everyone.
I'm trying to use the segmented function with the following data:
For instance, I use segmented package as follow:
myreg2 = lm(xy$y ~ xy$x)
mysegmented = segmented(myreg2, seg.Z=~x, psi=c(245000), control =
seg.control(display=FALSE))
Which get me to the following error :
As a
Mike Harwood harwood262 at gmail.com writes:
Is the labeling/naming of levels in the documentation for the
predict.glmmPQL function backwards? The documentation states Level
values increase from outermost to innermost grouping, with level zero
corresponding to the population predictions.
Hi Petra,
Try this:
dat$sums - rowSums(dat[3:5], na.rm=TRUE)
I think this should do what you're looking for
HTH,
Ivan
Message original
Sujet: [R] Sum of a couple of variables of which a few have NA values
Date : Tue, 10 Jan 2012 17:25:21 +0100
De :Petra Opic
On Jan 10, 2012, at 11:25 AM, Petra Opic wrote:
Dear everyone,
I have looked all over the internet but I cannot find a way to solve
my problem.
? rowSums # has an na.rm argument
In my data I want to sum a couple of variables. Some of these
variables have NA values, and when I add
On 10/01/2012 11:31 AM, Wang, Jing wrote:
Dear Sir/Madam,
I want to download R development version 2.15.0 source code. But I just found
the version for windows and MacOS. So would you please give me some instruction
about how can I download the R 2.15.0 source code? Thank you very much for
Hi Justin,
thanks a lot for your quick answer.
If I use your code, all points become red.
How do you include the sorted and separated four values into the points
argument?
The variable in your script is called circ but this is not fronted up
anymore.
Here the script again:
x = runif(10)
x[4] = NA
sum(x, na.rm = T)
--
View this message in context:
http://r.789695.n4.nabble.com/Sum-of-a-couple-of-variables-of-which-a-few-have-NA-values-tp4282448p4282483.html
Sent from the R help mailing list archive at Nabble.com.
__
I have to disagree with what's been posted, but I think some very interesting
points have been addressed. I'd like to add my two cents.
Consider the pair {X, 1-X} where X is sampled from a uniform(0,1)
distribution. The quantity 1- X also comes from a uniform(0,1) distribution
and therefore
Apologies for cross-posting
We would like to announce an on-line 'Beginner's Guide to R' course
With video presentations of theory and solutions
For details: http://www.highstat.com/statscourse.htm
Kind regards,
Alain Zuur
__
Hi,
I'm just finishing up an R package and I was wondering if anyone knows how
to include institution name in the Description File. That is, my current
Description File looks like:
Package: curatedCancerData
Type: Package
Title: Cancer Gene Expression Analysis
Version: 1.0
Date: 2011-12-24
woops! see inline.
Hope that helps, and enjoy R.
Justin
On Tue, Jan 10, 2012 at 8:40 AM, Geophagus
falk.hilli...@twain-systems.comwrote:
Hi Justin,
thanks a lot for your quick answer.
If I use your code, all points become red.
How do you include the sorted and separated four values into
On 10/01/2012 1:02 PM, Ben Ganzfried wrote:
Hi,
I'm just finishing up an R package and I was wondering if anyone knows how
to include institution name in the Description File. That is, my current
Description File looks like:
Package: curatedCancerData
Type: Package
Title: Cancer Gene
Hello,
I think I am right in saying that a 2 sample wilcox.test is equal to a 2
sample kruskal.test and
a 2 sample t.test is equal to a 2 sample anova. This is also stated in the
?kruskal.test man page:
The Wilcoxon rank sum test (wilcox.test) as the special case for two
samples; lm together
On 10.01.2012 14:35, natalia norden wrote:
Hello,
I was using version 2.13.2 and I have just downloaded the latest version
2.14.1. However, I'm trying to install the packages I was using and when I
look for them in the packages list, I can´t find many in the CRAN binaries
(e.g. vegan). I do
2012/1/10 syrvn ment...@gmx.net
And why does kruskal.test(x~y) differ from kruskal.test(f~d)??
Your formula is wrong, but function doesn't see errors.
formula
a formula of the form lhs ~ rhs where lhs gives the data values and rhs the
corresponding groups.
And that leads to
Thanks for getting me on the right path Gabor! I have one outstanding
issue though.
On Mon, Jan 9, 2012 at 4:21 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Mon, Jan 9, 2012 at 6:39 PM, Sam Albers tonightstheni...@gmail.com wrote:
Hello all,
I am trying to determine how to
Hello,
I am trying to convert BY to a data frame, consider the following example:
exampleDF-data.frame(a=c(1,2),b=c(10,20),name=c(first,second))
exampleBY-by(exampleDF,with(exampleDF,paste(a,b,sep=_)),
function(x) {
data.frame(
On 01/03/2012 03:19 PM, Julien Textoris wrote:
I'm trying to parallelize the following R code :
pk2test =
c(1:16,(12*16+1):(12*16+16),(16*16+1):(16*16+16),(20*16+1):(20*16+16))
score.mat = matrix(nc=16*4,nr=16*4)
for(i in 1:(16*4)) {
for(j in i:(16*4)) {
Hi Everyone,
I'm working on building some classification trees, and up to this point
I've been using rpart. However, I recently discovered the tree package,
and found that it had some useful functions (in particular deviance(),
which I would really like to use for my project). I can't seem
Dear Ivan,
Thank you very much for your help.
How do I use rowSums if I need to skip a variable from summing? (example:
sum var1, var2, var3, var5, var34 only).
Thanks in advance,
Petra Opic
--
View this message in context:
Hello,
Is it possible to use R on public server where each user has its own
restricted R session?
In particular, how to prohibit some set of functions, for example,
from base package?
How to limit session operating memory and CPU time? What additional
security considerations must be taken care
I want to use the grplasso package on a data set where I want to fit a linear
model. My interest is in identifying significant beta coefficients. The
documentation is a bit cryptic so I'd appreciate some help.
I know this is a strategy for large numbers of variables but consider a simple
The whole of idea of 'level' in mixed models is confusing to some.
Professor Snijders (who teaches our students) and Professor Bates label
from opposite ends.
But, assuming this is my work in package MASS (Master Harwood: it is
childish, to put it mildly, to fail to give due credit), it
R version 2.12.0, 64 bit on Windows.
Here is a short script that illustrates the problem:
library(tseries)
library(xts)
setwd('C:\\cygwin\\home\\Ted\\New.Task\\NKs-01-08-12\\NKs\\tests')
x = read.table(quotes_h.2.dat, header = FALSE, sep=\t, skip=0)
str(x)
y -
On Jan 10, 2012, at 1:36 PM, Ramiro Barrantes wrote:
Hello,
I am trying to convert BY to a data frame, consider the following
example:
exampleDF-data.frame(a=c(1,2),b=c(10,20),name=c(first,second))
exampleBY-by(exampleDF,with(exampleDF,paste(a,b,sep=_)),
function(x) {
Thank you very much for your answers. I could do it by downloading the
package I needed manually and then installing it through the Terminal. Yet
the fundamental problem remains. I downloaded R 2.14.1 several times from
different mirrors and there are many packages that do not show up in the
list
What lists are you referring to when you state: there are many packages that
do not show up in the list of binaries. They do in the list of sources? CRAN?
To see all packages installed on your machine try
rownames(installed.packages(())
I think available.packages() will give packages
##I have 2 columns of data. The first column is unique event IDs that
represent a phone call made to a customer.
###So, if you see 3 entries together in the first column like follows:
matrix(c(call1a,call1a,call1a) )
##then this means that this particular phone call (the first call that's
I've made fligner test with the same data, changing the orders of the
variables, and this what i get
fligner.test(rojos~edadysexo*zona*ano*estacion)
Fligner-Killeen test of homogeneity of variances
data: rojos by edadysexo by zona by ano by estacion
Fligner-Killeen:med chi-squared =
Folks,
My object oriented background is in Java and C++. I am a novice to using
S4/object-oriented coding in R but not to R. Below is an example that I found
that I have expanded on.
I am not getting how prototype and initialize work together, if at all.
Here is output from a short session
Hi,
I'm pretty new at programming and with the R language. I'm just trying to
get familiar with R and wrote a script in gedit (should I use emacs
instead?),
x - [10.4 5.6 3.1 6.4 21.7]
y - [12,5.6, 7.2, 1.0, 9.3]
plot(x,y)
then I went to the command window in the terminal (I'm using unix) to
I would like to make a correlogram in which I also have a correlation matrix
instead of one of the panels.
Is that possible?
--
View this message in context:
http://r.789695.n4.nabble.com/Correlograms-tp4283245p4283245.html
Sent from the R help mailing list archive at Nabble.com.
There might be an x in your R session, but not from that script. Try
it by pasting
those three lines at the command line:
x - [10.4 5.6 3.1 6.4 21.7]
Error: unexpected '[' in x - [
y - [12,5.6, 7.2, 1.0, 9.3]
Error: unexpected '[' in y - [
plot(x,y)
Error in plot(x, y) : object 'x' not
Tena koe Anna
[ is for subsetting, you need c():
x - c(10.4, 5.6, 3.1, 6.4, 21.7)
y - c(12, 5.6, 7.2, 1.0, 9.3)
plot(x, y)
HTH
Peter Alspach
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Anna Olofsson
Sent: Wednesday, 11
If I understand your question correctly, install the corrgram package from
CRAN.
Then,
library(corrgram)
cm - cor(iris[ , 1:4])
corrgram(cm, type=corr)
Also, see help for the vote data:
?vote
Kevin Wright
On Tue, Jan 10, 2012 at 2:06 PM, Natbyah nathanie...@gmail.com wrote:
I would like to
On Jan 10, 2012, at 21:30 , gaiarrido wrote:
I've made fligner test with the same data, changing the orders of the
variables, and this what i get
fligner.test(rojos~edadysexo*zona*ano*estacion)
Fligner-Killeen test of homogeneity of variances
data: rojos by edadysexo by zona
On Mon, Jan 9, 2012 at 8:00 PM, jim holtman jholt...@gmail.com wrote:
try this:
x - structure(list(speed = c(3,9,14,8,7,6), result = c(0.697, 0.011, 0.015,
0.012, 0.018, 0.019), house = c(1,
+ 1, 1, 1, 1, 1), date = c(719, 1027, 1027, 1027, 1030, 1030),
+ id = c(1000, 1,
+ 10001,
Hi--
I suspect this is a frequently considered (and possibly asked) question, but I
haven't thus far found an answer:
For slicing a vector with x[…], is there a symbol for length(x)?
I'm seeking a short-hand for referring to the length of vector one is trying to
index.
E.g., for a
On 01/10/2012 11:47 AM, Keith Weintraub wrote:
Folks,
My object oriented background is in Java and C++. I am a novice to using
S4/object-oriented coding in R but not to R. Below is an example that I found
that I have expanded on.
I am not getting how prototype and initialize work together,
Hi,
On Tue, Jan 10, 2012 at 6:04 PM, Eric Rupley erup...@umich.edu wrote:
Hi--
I suspect this is a frequently considered (and possibly asked) question, but
I haven't thus far found an answer:
For slicing a vector with x[…], is there a symbol for length(x)?
I'm seeking a
On Wed, 11 Jan 2012, iliketurtles wrote:
##I have 2 columns of data. The first column is unique event IDs that
represent a phone call made to a customer.
###So, if you see 3 entries together in the first column like follows:
matrix(c(call1a,call1a,call1a) )
##then this means that this
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Steve Lianoglou
Sent: Tuesday, January 10, 2012 3:28 PM
To: Eric Rupley
Cc: r-help@r-project.org
Subject: Re: [R] short-hand to avoid use of length() in subsetting
vectors?
Hi,
i'd like to update my R-Reference card and commit some edits,
but i could not get the source from rpad.org
Did it move?
kind regards,
--
Jonas Stein n...@jonasstein.de
__
R-help@r-project.org mailing list
I'm having a really difficult time understanding what you're trying to
get -- copy and pasting your code is failing to run, and your question
isn't clear, ie:
For each phone call that BEGINS with the module which is denoted by 81
(i.e. of the form 81X,XXX), what is the expected number of modules
On Wed, 11 Jan 2012, Ray Brownrigg wrote:
On Wed, 11 Jan 2012, iliketurtles wrote:
##I have 2 columns of data. The first column is unique event IDs that
represent a phone call made to a customer.
###So, if you see 3 entries together in the first column like follows:
Steve:
I don't understand why you couldn't get the original code working. You just
have to
notice that one comment overflows its line.
However I couldn't get your code to match the output of the original - almost,
but not
quite!
Ray
On Wed, 11 Jan 2012, Steve Lianoglou wrote:
I'm having
Let me just reply to myself.
Sorry, it's funny how much I don't get this, but it appears Ray is
following you and provides an answer -- scratch my email, it seems to
be way off
(you should still learn plyr and/or data.table if you haven't yet, tho ;-)
Apologies,
-steve
On Tue, Jan 10, 2012 at
Yeah -- just fired off an apology email before this landed in my inbox.
Sometimes I'm better off not trying to help at all -- this was one of
those cases ;-)
Whatever I was trying to do clearly was going down the wrong trail
Thankfully, you're on top of it though.
Sorry for the spam,
-steve
I am getting the following erro rmessage in ordistep. I have a number of
similarly structured datasets using ordistep in a loop, and the message
only occurs for some of the datasets.
I cannot include a reproducible sample - the specific datasets where this
is occur ing are fairly large and
AlanM said,
Consider the pair {X, 1-X} where X is sampled from a uniform(0,1)
distribution. The quantity 1- X also comes from a uniform(0,1)
distribution and therefore is probabilistic and not deterministic. The
sum of independent random variables is itself a random variable. If X1,
X2 X3
On 12-01-10 6:04 PM, Eric Rupley wrote:
Hi--
I suspect this is a frequently considered (and possibly asked) question, but I
haven't thus far found an answer:
For slicing a vector with x[…], is there a symbol for length(x)?
No, there isn't. You don't need it much, but if you do
Yeah! it works, i know it because of the degrees of freedom. This is what i
get now
g - interaction(ano, edadysexo, zona, estacion)
fligner.test(rojos ~ g)
Fligner-Killeen test of homogeneity of variances
data: rojos by g
Fligner-Killeen:med chi-squared = 249.7591, df = 87,
Hi all:
My OS is 32bit winxp,but I wanna install 64bit R2.14.1.
From the following website,it says You can also go back and add 64-bit
components to a 32-bit install, or vice versa
I am having problems with the constrOptim problem. I am trying to compute
a function which must be concave. When I put the linear constraints in,
constrOptim always returns the original values of the parameter entered
after several iterations. However, if I set ui to the 0 matrix, it will
optimize
Thank you! The c was missing. I don't know if it's ok to continue on this
thread, but I also had another question about reading data. I have this
file containing 3 columns and 19 rows.
0 0.960.21
0 0.450.4
0 0.870.1
0 0.560.04
0 0.570.04
0
That sort of name is allowed but not advised because it can lead to confusion
in certain non-standard evaluation functions like subset(). If you really want
the name like that add the check.names = FALSE argument to read.table()
Michael Weylandt
On Jan 10, 2012, at 5:57 PM, Anna Olofsson
Hello,
We're curious to know why, on builds lacking Tcl/Tk,
try(library(tcltk),silent=TRUE)
still allows the message to be printed:
Error in firstlib(which.lib.loc, package) :
Tcl/Tk support is not available on this system
though it does succeed in trapping the error condition?
Hello,
I am not sure how to do this in R. Any suggestion would be
appreciated. I have a vector of values from where I build an empirical
CDF. For example:
x - seq(1,100)
x - sample(x,1000,replace=T)
quantile(x,probs=seq(0,1,.05))
0% 5%10%15%20%25%30%35%40%
Look at ?ecdf
Michael
On Jan 10, 2012, at 11:52 PM, Robert A'gata rhelp...@gmail.com wrote:
Hello,
I am not sure how to do this in R. Any suggestion would be
appreciated. I have a vector of values from where I build an empirical
CDF. For example:
x - seq(1,100)
x -
Hi Robert,
Try
set.seed(123)
x - seq(100)
x - sample(x, 1000, replace = TRUE)
f - ecdf(x)
f(10)
# [1] 0.099
f(71)
# [1] 0.716
See ?ecdf for more information.
HTH,
Jorge.-
On Tue, Jan 10, 2012 at 11:52 PM, Robert A'gata wrote:
Hello,
I am not sure how to do this in R. Any suggestion
Thank you. That's easier than I thought.
On Wed, Jan 11, 2012 at 12:06 AM, Jorge I Velez
jorgeivanve...@gmail.com wrote:
Hi Robert,
Try
set.seed(123)
x - seq(100)
x - sample(x, 1000, replace = TRUE)
f - ecdf(x)
f(10)
# [1] 0.099
f(71)
# [1] 0.716
See ?ecdf for more information.
Thanks for you help guys, your suggestion Ajay worked fine, cheers
Dyfed Thomas
Population Health Analyst
DDI: 07 858 5967
Mob: 021 409 800
Midlands Health Network
WEL House
711 Victoria Street
PO Box 983
Hamilton 3240
Phone: 07 839 2888
Fax: 07 834 9242
From: Ajay Askoolum [via R]
83 matches
Mail list logo