I've recently started using R for spatial data. I'd be really grateful
if you could could help me with this. Thanks!
Sorry I don't provide a reproducible example. Please ask me if you have
any questions about the data.
I've extracted data from a multidimensional netCDF file. This file had
lo
Dear John
Sorry I use 3 degree of freedom for cubic spline. After using 4, it
is still not 2. I may make some naive mistake, but I cannot figure
out. Where is the problem?
4 (cubic on the right side of the *interior* knot 8)
+ 4 (cubic on the left side of the *interior* knot 8)
- 1 (two curves m
Hi,
If the two pairs of matrices are in a list:
set.seed(42)
lst1 <- lapply(1:11, function(x) matrix(sample(40, 20, replace=TRUE), 5,4))
names(lst1) <- paste0("gs", paste0("4.",seq(0,100,by=10)))
set.seed(585)
lst2 <- lapply(1:11, function(x) matrix(sample(40, 20, replace=TRUE), 5,4))
names
Sorry, your communication *was* on-list. I guess my eyes are going!
Please ignore the first sentence of my previous post.
cheers,
Rolf
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guid
Hello,
I have a data file of 108mb with snps data of 0,1,2. I am new in the program
and have to do this project. My first step is to get the p value using
chisq.test function. I have tried running the function however since I am new
to language I am aware of how to do this step. My error am
Thanks.
--
QQ: 1733768559
At 2014-04-15 17:56:01,"Jim Lemon" wrote:
>On 04/15/2014 07:51 PM, meng wrote:
>> Yes,it works !
>> What's the reason for it?
>>
>Hi meng,
>As I understand it, the lattice graphics system produces plot
>objects, not actual output on a graphic device. This is in
Please keep communications on-list unless there is a genuine reason not to.
To answer your question: Yes, you need to convert to ppp format; the
nnwhich() function requires its first argument to be of class "ppp".
My example showed you how to construct or "estimate" a window if you
don't have
Here you go:
install.packages("plotrix")
library(plotrix)
?floating.pie
dat<- data.frame(x=c(19.9437314, 20.2214171, 20.0955891, 20.9506636),
y=c(40.7086377, 41.4924336, 39.9481364, 40.6447347),
City=c(120,1, 4, 10),
Village=c(425, 1, 4, 15)
Hello,
Inline.
Em 15-04-2014 18:02, Monaly Mistry escreveu:
Hi,
I have a data frame with 15 different years and each year has a different
sample size. I'm having trouble writing a for loop to have a t-test done
for each year for two of the columns. Thus far I have been able to loop
over the
found the solution:
v <- function(x, ...) UseMethod("v")
setMethod('v', signature(x='character'), function(x, ...) v.print(x, ...))
setMethod('v', signature(x='numeric'), function(x, ...) v.numeric(x, ...))
v.print <- function(x,y=x,z=x) print(paste(x,y,z))
v.numeric <- function(x,u=3*x) print(u
Hello,
I believe you want na.action = na.exclude.
lmnew <- lm(newy ~ newx,newdata,na.action=na.exclude)
na.action can not be set to TRUE or FALSE. From the help page ?lm
na.action
a function which indicates what should happen when the data contain NAs.
The default is set by the na.ac
Yes. I believe what you're looking for is:
See ?predict.lm and what it has to say about the na.action=na.exclude
argument to lm.
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wis
This request, like the one from earlier today, is off-topic on R-help, and
off-topic on the other mailing lists you cross posted to. It is rude to cross
post to multiple mailing lists... pick the appropriate place according to the
relevant Posting Guide and stick with it. Not only are you broadc
I think the following is a trifle faster than the i%in%names(x) version,
probably because it only does the name lookup once. (I also don't
like to use return() - it is too much like goto.)
getElement3 <- function(x, i, default) {
i <- match(i, names(x))
if (is.na(i)) {
default
} el
On Apr 15, 2014, at 6:32 AM, Therneau, Terry M., Ph.D. wrote:
> You can do statistical tests within a single model, for whether portions of
> it fit or do not fit. But one cannot take three separate fits and compare
> them. The program needs context to know how the three relate to one another
Dear All,
I narrowed down my problem to
library(tcltk)
in .First() which causes the freezing of R and Aquamacs running it.
What could make tcltk behave in this way?
Christian
I am using Aquamacs 3.0a (GNU Emacs 24.3.50.2)with R3.0.3, newly
installed: sessionInfo()
---
R version 3.0
Hi AK,
Thanks very much. I worked great.
Many thanks.
Atem.
On Tuesday, April 15, 2014 9:20 AM, arun wrote:
Hi Atem,
May be this works.
### Q1: working directory: Observed #Only one file per Site. Assuming this is
the
### case for the full dataset, then I guess there is no need to average
di
So I know I must be missing something simple and obvious for the following
data manipulation where I have (in this example) 11 pairs of matrices
(gs4.0 to gs4.100 and ps1.0 to ps1.100) from some population simulations
(all with same dimensions) where I want to get some summary statistics on
the pro
Hi.
I'm trying to produce lm fitted values and standard errors for cases with
missing y values. I know how to compute these myself with matrix algebra, but
I'm wondering if there is an appropriate na.action in the lm function to do
this.
Here is some simple code where I use na.action=NULL with
Thanks to Marc Schwartz and Hadley Wickham:
Based on their comments, I think I'll add a combination of
Hadley's code and getElement{base} Ecfun in a form like
getElement2(object, name, default).
Best Wishes,
Spencer
On 4/15/2014 9:33 AM, Hadley Wickham wrote:
You really
Sorry Jim not for my beginner level :(((
So if my data are like this :
x y City Village
19.9437314 40.7086377 120 425
20.2214171 41.4924336 1 1
20.0955891 39.9481364
Hi,
I have a data frame with 15 different years and each year has a different
sample size. I'm having trouble writing a for loop to have a t-test done
for each year for two of the columns. Thus far I have been able to loop
over the years but the output is the same t-test 15 times. I'm new to
wr
Hi Rolf,
Thank you very much, I just have one other question, do I need to change
the data frame into ppp format? I've tried using as.ppp but get the
following error message:
Error: x,y coords given but no window specified
Best,
Monaly.
On Thu, Apr 3, 2014 at 9:23 PM, Rolf Turner wrote:
>
Hi, I am very much interested in using R. I have a query: 1.I have .Net
Application from which am trying to invoke R libraries from R.NET(Libraries
provided in Codeplex)2. R uses a Package called qcc(qualityChart Controls)
which has a function mqcc() with set of parameters passed to it. After
Hi Atem,
May be this works.
### Q1: working directory: Observed #Only one file per Site. Assuming this is
the
### case for the full dataset, then I guess there is no need to average
dir.create("final")
lst1 <- split(list.files(pattern = ".csv"), gsub("\\_.*", "",
list.files(pattern = ".csv")))
Dear Xing,
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Xing Zhao
> Sent: Tuesday, April 15, 2014 1:18 PM
> To: John Fox
> Cc: r-help@r-project.org; Michael Friendly
> Subject: Re: [R] The explanation of ns() with df =2
>
On Apr 15, 2014, at 2:09 AM, Pavneet Arora wrote:
> As a result, the pdf takes forever to load and doesn?t let me print, as it
> runs out of memory. I was wondering if there is a way if I can save each
> plot as jpeg and then export it on pdf. Will that make it quicker in
> loading? If so, how
Hi Terry,
thank you for your suggestion. I tried to do it the way that you described.
I fitted my Cox model with strata and I get coefficients and P values for my
ZlnGalectin in the different strata (see summary below). So am not so
familiar with R so please excuse my perhaps stupid questions but
Dear All,
How to test whether the correlation in the matrix of correlation of a
two-equations SUR model fitted by package systemfit are significant?
Thanks in advance,
Paul
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-h
Dear Michael and Fox
Thanks for your elaboration. Combining your explanations would, to my
understanding, lead to the following calculation of degree of
freedoms.
3 (cubic on the right side of the *interior* knot 8)
+ 3 (cubic on the left side of the *interior* knot 8)
- 1 (two curves must be co
On Apr 15, 2014, at 9:19 AM, Boris Steipe wrote:
> The following works for me:
>
> x <- rnorm(10)
> plot(x, xaxt="n")
> axis(side=1, at=axTicks(1),lab=c("≤ a","≥ b","≈ c","≠ d","= e"))
>
> (In case the characters get mangled in transition:
> I have used le, ge, approx. equal, ne, and equal in t
Hello,
Thanks, and sorry for the bug.
I used what the op was using [system()] without checking if it worked.
shell() worked in Windows 7/R 3.1.0.
sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Portuguese_Portugal.1252
LC_CTYPE=Port
Please see R FAQ 7.22
7.22 Why do lattice/trellis graphics not work?
==
The most likely reason is that you forgot to tell R to display the graph.
Lattice functions such as `xyplot()' create a graph object, but do not
display it (the same is true of *ggp
You really want to use the names of the list since lists can contain
null. I'd recommend something more like:
getElement <- function(x, i, default) {
if (i %in% names(x)) return(x[[i]])
default
}
Hadley
On Tue, Apr 15, 2014 at 10:53 AM, Spencer Graves
wrote:
> Hello:
>
>
> Do you kno
On Apr 15, 2014, at 11:22 AM, Marc Schwartz wrote:
> On Apr 15, 2014, at 10:53 AM, Spencer Graves
> wrote:
>
>> Hello:
>>
>>
>> Do you know of a simple function to return the value of a named element
>> of a list if that exists, and return a default value otherwise?
>>
>>
>> It's
... and obviously, if you want the original values:
x <- rnorm(10)
plot(x, xaxt="n")
axis(side=1, at=axTicks(1),labels=paste("≤", axTicks(1)))
B.
On 2014-04-15, at 12:19 PM, Boris Steipe wrote:
> The following works for me:
>
> x <- rnorm(10)
> plot(x, xaxt="n")
> axis(side=1, at=axTicks(1),
On Apr 15, 2014, at 10:53 AM, Spencer Graves
wrote:
> Hello:
>
>
> Do you know of a simple function to return the value of a named element
> of a list if that exists, and return a default value otherwise?
>
>
> It's an easy function to write (e.g., below). I plan to add this to t
The following works for me:
x <- rnorm(10)
plot(x, xaxt="n")
axis(side=1, at=axTicks(1),lab=c("≤ a","≥ b","≈ c","≠ d","= e"))
(In case the characters get mangled in transition:
I have used le, ge, approx. equal, ne, and equal in this example)
Cheer,s
B.
On 2014-04-15, at 11:58 AM, Dennis Fis
Show us your code.
-- Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch
On Tue, Apr 15, 2014 at 8:58 AM, Dennis Fisher wrote:
> R 3.0.2
> OS X
>
> Colleagues
>
R 3.0.2
OS X
Colleagues
In a graphic, the x-axis values
2, 4, 6, 8, 10, 12
I would like to present these as:
≤ 2, ≤ 4, ≤ 6, ≤8, ≤ 10, ≤ 12
I have tried to accomplish this with
expression
and
bquote
without success. Can someone provide the appropriate code?
Hello:
Do you know of a simple function to return the value of a named
element of a list if that exists, and return a default value otherwise?
It's an easy function to write (e.g., below). I plan to add this
to the "Ecfun" package unless I find it in another CRAN package.
On 04/15/2014 05:00 AM, r-help-requ...@r-project.org wrote:
Hello,
I have the following problem. I stratified my patient cohort into three
ordered groups and performed multivariate adjusted Cox regression analysis
on each group separately. Now I would like to calculate a p for trend across
the h
This request is off-topic per the Posting Guide, which you seem not to have
read (this question is clearly a development question, and you are posting
using HTML email format which is not supported on this list).
Please note that that .NET is not one of the development environments supported
by
You can do statistical tests within a single model, for whether portions of it fit or do
not fit. But one cannot take three separate fits and compare them. The program needs
context to know how the three relate to one another. Say that "group" is your strata
variable, trt the variable of inte
Dear Xing Zhao,
To elaborate slightly on Michael's comments, a natural cubic spline with 2 df
has one *interior* knot and two boundary knots (as is apparent in the output
you provided). The linearity constraint applies beyond the boundary knots.
I hope this helps,
John
---
On 15.04.2014 03:25, Linda Peng wrote:
Hi,
I encountered following error" Warning in install.packages("xlsx") : 'lib = "C:/Program
Files/R/R-3.1.0/library"' is not writable". This is right after I installed R-3.1.0 on windows
after previous R-2.15.2 which is still existing.
If you want
You have > 1e6 observations and your lines() have these many segments,
try to plot the sensity only with few hndreds of segemnts.
Best,
Uwe Ligges
On 15.04.2014 12:27, Pavneet Arora wrote:
Hello All,
I have multiple plots that I want to save it a single file. At the moment,
I am saving as pd
On 15.04.2014 12:58, 韩红静 wrote:
Dear R users: I'm trying to program the Friedman'test(),but I meet some problemes.
I am reading the data below with s1=read.table("1express.txt",header=T)
Then,I get the
datas1B1AD1X1544766544667659886677646678777667977877
On 15.04.2014 14:03, mark.l...@hauck-aufhaeuser.de wrote:
Hello,
we get at a users individual following error: java.lang.OutOfMemoryError:
unable to create new native thread
Can you please tell me how I can fix this?
You are using the xlsx package?
Increase the java heap size, I find a sol
Kafi,
I'm not sure why you contacted me directly so I have also forwarded this to
the r-help list. I am unsure as to what your problem is. At first glance,
I noticed you are missing a parentheses in the WL3 line near the end but
that is just after a quick scan of your code. Please be more speci
No, the curves on each side of the know are cubics, joined
so they are continuous. Se the discussion in \S 17.2 in
Fox's Applied Regression Analysis.
On 4/15/2014 4:14 AM, Xing Zhao wrote:
Dear all
I understand the definition of Natural Cubic Splines are those with
linear constraints on the en
Hi,
We are using on R tool for our one of the project and looking for some
technical support.
Could you please help us.
Flow:
1. We have C#.Net Application which uses R.NET Dll's for invoking R
2. R internally uses qcc package (mqcc function) for plotting the chart.
Requirement:
1. We
Hello,
we get at a users individual following error: java.lang.OutOfMemoryError:
unable to create new native thread
Can you please tell me how I can fix this?
Thank you very much
Sincerely yours
Mark Link
Applikationsmanagement
Hauck & Aufhäuser Privatbankiers KGaA
Kaiserstraße 24
60311
Dear R users: I'm trying to program the Friedman'test(),but I meet
some problemes. I am reading the data below with
s1=read.table("1express.txt",header=T) Then,I get the
datas1B1AD1X15447665446676598866776466787776679778777886868655786777888555777767
Hello All,
I have multiple plots that I want to save it a single file. At the moment,
I am saving as pdf. Each plot has a qqnorm, qqline, tiny histogram in the
top left graph with its density drawn top of it and the normal
superimposed on the histogram.
As a result, the pdf takes forever to lo
Hello All,
I have multiple plots that I want to save it a single file. At the moment,
I am saving as pdf. Each plot has a qqnorm, qqline, tiny histogram in the
top left graph with its density drawn top of it and the normal
superimposed on the histogram.
As a result, the pdf takes forever to lo
Thank you Milan, the fileEncoding bit worked perfectly.
From: Milan Bouchet-Valat
To: Jeff Newmiller
Cc: Pavneet Arora/UK/RoyalSun@RoyalSun, r-help@r-project.org,
pavnee...@yahoo.co.uk
Date: 14/04/2014 18:03
Subject:Re: [R] Read.table mucks up headers
Le lundi 14 avr
just a note i liked to add:
so the idea is just to have the optional arguments y and z showing up in the
the v-function call using the tab-key
--
View this message in context:
http://r.789695.n4.nabble.com/generic-function-method-arguments-accessible-by-tab-key-tp4688793p4688794.html
Sent from
Hi,
I have the following problem:
I wrote a Generic Function that comes with a bunch of different methods and
even more arguments.
It's kind like this:
if ( !isGeneric("v") ) {
setGeneric("v", function(x, ...)
standardGeneric("v"))
}
setMethod('v', signature(x='character'),
Yes,it works !
What's the reason for it?
Many thanks!
--
QQ: 1733768559
At 2014-04-15 14:36:41,"Jim Lemon" wrote:
>On 04/15/2014 11:46 AM, meng wrote:
>> Hi all:
>> I met a question about the output of plot.
>> I want to output 3 plots.
>> Method1: by function histogram{lattice}
>> Me
Hi
No attachment allowed. Well, some yes but not many.
Do not expect somebody will go through great deal of code. Try instead locate
source of problems yourself. If you are lucky you will find it out without
intervence of others, if not you will be able to post more straight question
which can
On 04/15/2014 07:51 PM, meng wrote:
Yes,it works !
What's the reason for it?
Hi meng,
As I understand it, the lattice graphics system produces plot
objects, not actual output on a graphic device. This is in aid
of having an object that can be modified or stored rather than
an image that cannot.
Hi
better to use dput for presenting data as it is directly usable by anybody. So
I did not test it.
Try to get names for appropriate columns
nn<-names(d)
and use get
s=survfit(Surv(get(nn[2]), get(nn[3]))~get(nn[1]), data=d)
It works with lm and shall work with survit too.
Regards
Petr
>
Dear all
I understand the definition of Natural Cubic Splines are those with
linear constraints on the end points. However, it is hard to think
about how this can be implement when df=2. df=2 implies there is just
one knot, which, according the the definition, the curves on its left
and its right
On Mon, 14 Apr 2014, ChrisR wrote:
Hi everyone,
I am using the hetglm() command from the package 'glmx' (0.1-0). It seems
that hetglm() is incompatible with the robust standard errors estimator
provided in the 'AER' package: coeftest(mymodel,vcov=vcovHC)
Any suggestions how I could obtain robust
65 matches
Mail list logo