Hi,
I am new to doing spatial analysis. I am interested in trying many things
in R, but one of the first things I would like to do is plot all of my lat,
lon points in a csv file within a window defined by a shapefile.
I have read in the shape file by doing the following:
border
Hi,
I am new to linux so please bear with me.
OS is CentOS 5.9 - This cannot be changed
I am following a guide given to me to setup a server.
I am told to do the following:
To Install R:
sudo yum install gcc
sudo yum install make
sudo yum install telnet
sudo rpm -Uvh
Hi all
Perhaps this is torturous methodology. I was trying to use lattice to produce a
barchart showing the number positive and negative over time. I wasn't quite
sure how create a different colour for values of arbo$Ikeda in the example
below ie red for ikeda and green for neg.
On Jun 12, 2013, at 4:58 PM, vinhnguyen04x wrote:
L. Snow,
Ted,
Many thanks, I am sorry to made a question without context. I use three
parameters of facial temperature, heart rate, and respiratory rate to
distinguish infectious patients from healthy subjects. So I use logistic
On Jun 12, 2013, at 6:43 PM, Andrew McFadden (Andy) wrote:
Hi all
Perhaps this is torturous methodology. I was trying to use lattice to produce
a barchart showing the number positive and negative over time. I wasn't quite
sure how create a different colour for values of arbo$Ikeda in the
Dear all,
This is an announcement that the final schedule for the useR! 2013
conference is available at http://www.r-project.org/useR-2013 .
This year we will be having a Data Analysis Contest open to all
participants. You can find more information here:
On 13/06/2013 05:09, Derek Serianni wrote:
Hi,
I am new to linux so please bear with me.
OS is CentOS 5.9 - This cannot be changed
I am following a guide given to me to setup a server.
I am told to do the following:
To Install R:
sudo yum install gcc
sudo yum install make
sudo yum install
Hi
Here i have a dataframe called MyDat.
MyDat- data.frame(NAME = c(ANTONY001, ARUN002, AKBAR003,
JONATHAN004, PETER005, AVATAR006, YULIJIE007, RAM008,
DESILVA009),
COL_A = c(0, 0, 0, 1, 0, 1, 2, 3, 1),
COL_B = c(0, 3, 0, 3, 3, 1, 0, 1, 2),
COL_C = c(1, 2, 3, 1, 2, 3, 1, 2, 3),
Hello,
?grep
grep('ARUN', MyDat$NAME)
[1] 2
Regards,
Pascal
On 13/06/13 16:08, R_Antony wrote:
Hi
Here i have a dataframe called MyDat.
MyDat- data.frame(NAME = c(ANTONY001, ARUN002, AKBAR003,
JONATHAN004, PETER005, AVATAR006, YULIJIE007, RAM008,
DESILVA009),
COL_A = c(0, 0, 0, 1, 0, 1,
suppose I have the following data
id=c(rep(1,3),rep(2,5),rep(3,4))
time=c(seq(1,3),seq(2,6),seq(1,4))
ds=cbind(id,time)
ds
id time
[1,] 11
[2,] 12
[3,] 13
[4,] 22
[5,] 23
[6,] 24
[7,] 25
[8,] 26
[9,] 31
[10,] 32
[11,] 33
which(!duplicated(ds[, id]))
Chris Campbell, PhD
Tel. +44 (0) 1249 705 450 | Mobile. +44 (0) 7929 628 349
mailto:ccampb...@mango-solutions.com | http://www.mango-solutions.com
Mango Solutions, 2 Methuen Park, Chippenham, Wiltshire , SN14 OGB UK
-Original Message-
From:
On Thu, Jun 13, 2013 at 6:26 AM, L S losedag...@gmail.com wrote:
I realized that the coordinates are completely different. The coordinates
in my data file (i.e. my csv file) are traditional GPS coordinates (e.g. 39.17
or 76.37). The shapefile however has x,y values such as 1416813.54262877
Hi,
I have a Tukey boxplot y-axis starting at 2.5, how do I force it's y-axis
to start a t zero
Thanks
--
Shane
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Hello,
Something like this?
x - runif(100, min = 2, max = 10)
boxplot(x, ylim = c(0, max(x)))
Hope this helps,
Rui Barradas
Em 13-06-2013 10:02, Shane Carey escreveu:
Hi,
I have a Tukey boxplot y-axis starting at 2.5, how do I force it's y-axis
to start a t zero
Thanks
Thanks that done the trick.
Cheers
On Thu, Jun 13, 2013 at 10:59 AM, Rui Barradas ruipbarra...@sapo.pt wrote:
Hello,
Something like this?
x - runif(100, min = 2, max = 10)
boxplot(x, ylim = c(0, max(x)))
Hope this helps,
Rui Barradas
Em 13-06-2013 10:02, Shane Carey escreveu:
I have a dataframe consisting of factors in one column. Im trying to remove
certain levels using the following code:
toBeRemoved1-which(DATA$UnitName_1==lake)
DATA-DATA[-toBeRemoved1,]
However it will not remove the level lake
In the past this worked for me, but its not working now. Any help
Am 13.06.2013 14:02, schrieb Shane Carey:
I have a dataframe consisting of factors in one column. Im trying to remove
certain levels using the following code:
toBeRemoved1-which(DATA$UnitName_1==lake)
DATA-DATA[-toBeRemoved1,]
However it will not remove the level lake
Hello!
Is this a part
It seems a line through the origin doesn't fit the data very well. That may be
throwing off the fitting routine.
data = c(144.53, 1687.68, 5397.91)
err = c(8.32, 471.22, 796.67)
model = c(71.60, 859.23, 1699.19)
id = c(1, 2, 3)
# display
plot(data ~ model)
library(Hmisc)
errbar(model,
Nope, but thanks
On Thu, Jun 13, 2013 at 1:11 PM, Albin Blaschka
albin.blasc...@standortsanalyse.net wrote:
Am 13.06.2013 14:02, schrieb Shane Carey:
I have a dataframe consisting of factors in one column. Im trying to
remove
certain levels using the following code:
HI,
Try this:
ds1- data.frame(id,time)
which(with(ds1,ave(time,id,FUN=seq))==1)
#[1] 1 4 9
A.K.
- Original Message -
From: Gallon Li gallon...@gmail.com
To: R-help@r-project.org
Cc:
Sent: Thursday, June 13, 2013 3:56 AM
Subject: [R] find the position of first observation for each
Please read the Posting Guide, which among other things points out that you
should be posting in plain text format, not HTML (which tends to corrupt
example R code).
Then please explain why your problem is not addressed by the below referenced
section of the R Inferno. You may need to read [1]
Works fine for me. Too bad you didn't include actual data:
set.seed(42)
DATA - data.frame(UnitName_1=factor(sample(c(lake, pond,
river),
+ 15, replace=TRUE)), Var=sample.int(100, 15))
DATA
UnitName_1 Var
1 river 95
2 river 97
3lake 12
4 river 47
5
Hi,
Without more information I guess your problem is that the level name
still exists in the factor whereas it doesn't appear anymore in the
factor. If so, try droplevels.
Alain Guillet
On 13/06/13 14:02, Shane Carey wrote:
I have a dataframe consisting of factors in one column. Im trying
Hi
The example contained errors in the line with cast and it is too late to check
without a reproducible example i am only guessing
perhaps add a groups argument and supply a col argument to superpose polygon eg
groups = Ikeda,
par.settings = list(superpose.polygon = list(col = 12 colours to
Hi,
Not sure if the OP is concerned about this:
Using David's data
str(DATA)
#'data.frame': 15 obs. of 2 variables:
# $ UnitName_1: Factor w/ 3 levels lake,pond,..: 3 3 1 3 2 2 3 1 2 3 ...
#$ Var : int 95 97 12 47 54 86 14 92 88 8 ...
toBeRemoved1 - which(DATA$UnitName_1==lake)
If you've read the R Inferno section, you already know that
following my example with
levels(DATA$UnitName_1)
[1] lake pond river
DATA$UnitName_1 - factor(DATA$UnitName_1)
levels(DATA$UnitName_1)
[1] pond river
removes the empty factor level.
-
David L
Also, if the ids are ordered and numeric:
which(c(1,diff(ds[,1]))0)
#[1] 1 4 9
A.K.
- Original Message -
From: arun smartpink...@yahoo.com
To: Gallon Li gallon...@gmail.com
Cc: R help r-help@r-project.org
Sent: Thursday, June 13, 2013 9:40 AM
Subject: Re: [R] find the position of first
val_w_time - data.frame(time = 1:12,
val = c(24,7,4,1,2,1,0,0,0,1,0,0))
fitdistr(val_w_time$val,gamma)
# Error in optim(x = c(24, 7, 4, 1, 2, 1, 0, 0, 0, 1, 0, 0), par = list( :
# initial value in 'vmmin' is not finite
# this error message doesn't necessarily
Thank you for the reply, I appreciate it very much.
I have the following responses:
sudo R CMD INSTALL ~/APX.X.X/Rserve_0.6-2.tar.gz
Explaining what 'does not work' means.
When I type this in. It says that the package is not found. Can you
guide me as to what I need to do here?
What
Hi... I'm still a beginner in R. While doing some curve-fitting with a raw data
set of length 22,000, here is what I had:
hist(y,col=red)
gives me the frequency histogram, 13 total rectangles, highest is near 5000.
Now
hist(y,prob=TRUE,col=red,ylim=c(0,1.5))
gives me the density
Thanks very much to everyone for their replies, especially Ista, who took the
time to write script. Before posting the question I had tried attach() and then
within or with statements and now know why those generated errors. Some of my
syntax was incorrect. Thanks for clearing that up. Within
Hi,
You could use:
?grep
grep(ARUN,MyDat[,1])
#[1] 2
#or
library(stringr)
which(!is.na(str_match(MyDat[,1],ARUN)))
#[1] 2
vec1-c(MyDat[,1],ARUN003,Arun)
which(!is.na(str_match(toupper(vec1),ARUN)))
#[1] 2 10 11
A.K.
- Original Message -
From: R_Antony antony.akk...@ge.com
To:
Freetype 2.4.12 was released in early May. Just so that we are clear that this
is a freetype bug which affects R's use of Cairo (among other things). So there
are updated bundles, and also bundles for Mac OS X as well, for both a patched
2.4.11 and 2.4.12 proper. The accompanying *.txt has a
Hi,
On Thu, Jun 13, 2013 at 11:13 AM, Mohamed Badawy mbad...@pm-engr.com wrote:
Hi... I'm still a beginner in R. While doing some curve-fitting with a raw
data set of length 22,000, here is what I had:
hist(y,col=red)
gives me the frequency histogram, 13 total rectangles, highest is near
Hi,
anyone can explain to me the following?
rho
[1] 0.9452398 0.8792735 0.9641829 0.9876954 0.9993560 0.9826084 1.000
[8] 1.000 0.7982916 1.000 0.3361956
any(rho = 1)
[1] FALSE
thanks, regards
Filippo
__
R-help@r-project.org mailing
Thanks David! I will pay attention to the format later. This is not
homework exercise, I am just providing a mimic sample of my actual data and
as I described in the original post, this is 1min data so the time interval
is 1 min.
On Wed, Jun 12, 2013 at 6:20 PM, David Winsemius
Density means that the AREAS of the bars add to 1, not the HEIGHTS
of the bars. You probably have intervals that are less than 1. Eg:
set.seed(42)
x - rpois(1000, 5)/100
info - hist(x, prob=TRUE)
info
$breaks
[1] 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 0.11
0.12 0.13
$counts
Hi all,
In answering a question yesterday about avoiding repeatedly typing the
name of a data.frame when making modifications to it I discovered the
following unexpected behavior of within:
mtcars - within(mtcars, {
x - 0
x[gear==4] - 1
})
generates a column named x in mtcars equal to 1
R FAQ 7.31.
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
On Thu, Jun 13, 2013 at 11:47 AM, Filippo Monari ingf...@gmail.com wrote:
Hi,
anyone can explain to me the following?
rho
[1] 0.9452398 0.8792735 0.9641829 0.9876954 0.9993560
Frequently Asked Questions 7.31 Why doesn't R think these numbers
are equal?
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think
-these-numbers-are-equal_003f
For more details read the First Circle of the R Inferno:
http://www.burns-stat.com/pages/Tutor/R_inferno.pdf
Why are you surprised? It has nothing to do with within() . ?[-
x - 0
g - 1:2
x[g==1]- 5
x
[1] 5 NA
-- Bert
On Thu, Jun 13, 2013 at 9:00 AM, Ista Zahn istaz...@gmail.com wrote:
Hi all,
In answering a question yesterday about avoiding repeatedly typing the
name of a data.frame when
On Thu, Jun 13, 2013 at 12:11 PM, Bert Gunter gunter.ber...@gene.com wrote:
Why are you surprised?
Because I missed the significance of examines the environment after
the evaluation of 'expr' and makes the corresponding modifications to
'data' in ?within, and thought my example should be
On Thu, Jun 13, 2013 at 12:17 PM, Ista Zahn istaz...@gmail.com wrote:
On Thu, Jun 13, 2013 at 12:11 PM, Bert Gunter gunter.ber...@gene.com wrote:
Why are you surprised?
Because I missed the significance of examines the environment after
the evaluation of 'expr' and makes the corresponding
within(mtcars,{ x-rep(0,nrow(mtcars));x[gear==4]-1;x[gear==3]-2}) #should
fix this;
A.K.
- Original Message -
From: Ista Zahn istaz...@gmail.com
To: Bert Gunter gunter.ber...@gene.com
Cc: r-help@r-project.org
Sent: Thursday, June 13, 2013 12:17 PM
Subject: Re: [R] puzzling behavior of
Yep, that's it. Thanks a lot for the replies I got.
I guess the point I was struggling with (as I was curve fitting a distribution
to sample data) is the discrete vs continuous densities.
But if one wants to model sample densities with a continuous, say normal,
distribution then the histogram
Hello,
If I use set.seed(x) to set a seed for the random number generator, how can I
undo that to revert a random output every time I run my code?
Thanks,
Pooya.
THIS E-MAIL IS FOR THE SOLE USE OF THE INTENDED
RECIPIENT(S) AND MAY CONTAIN CONFIDENTIAL AND
PRIVILEGED INFORMATION.
ANY
HI,
Please check this link
(http://r.789695.n4.nabble.com/Remove-levels-td4669441.html). It was posted
today.
df1-subset(df, Trt!=blank)
df2- df1
df1$Trt- factor(df1$Trt)
levels(df1$Trt)
#[1] Trt1 Trt2
#or
df2$Trt-droplevels(df2$Trt)
levels(df2$Trt)
#[1] Trt1 Trt2
A.K.
Hey guys
I am
Your shapefile should include specifications for its coordinate system.
Look for a file names maryland.prj in the same directory as maryland.shp.
And that coordinate system should be included in your 'border' object. You
might need to change to using readOGR() to load the shapefile into R. Use
Dear All,
this may be a trivial problem. A collaborator has created an R package for
internal use (not available on CRAN). This installs and works fine on my Mac
but fails to install on windows.
When I install the packagein windows by browing and pointing to the .zip file I
get the
Hi, I am using an Lenovo Thinkpad with Ubuntu and 5.5Gb of RAM.
I am running against a memory ceiling.
Upon starting R the following command executes, but
the system monitor tells me that R is now using 2.4 GB, and
gc() agrees with that:
m=matrix(data=1,ncol=18e3,nrow=18e3)
gc()
On 13/06/2013 11:59 AM, Pooya Lalehzari wrote:
Hello,
If I use set.seed(x) to set a seed for the random number generator, how can I
undo that to revert a random output every time I run my code?
If you remove .Random.seed, then the next time a seed is needed it will
be generated from the
What evidence do you have that the package did not install? The only
differences in the output that you show is that in the second case you get
extra output about downloading the package which does not apply in the
first case since you did not need to download the package.
On Thu, Jun 13, 2013
On 13/06/2013 1:26 PM, Raffaello Vardavas wrote:
Dear All,
this may be a trivial problem. A collaborator has created an R package for
internal use (not available on CRAN). This installs and works fine on my Mac
but fails to install on windows.
When I install the packagein windows by
I'm working with NHIS survye data. I'd like the to use muliple imputation
to cover the missing data for the variables in which I'm interested. My
question concerns the use of certain variables in the imputation model.
For example, race would be an important predictor in the imputation
Is this an R question?
Seems like it belongs on a statistical or survey list, not r-help.
Cheers,
Bert
On Thu, Jun 13, 2013 at 10:37 AM, Scott Raynaud scott.rayn...@yahoo.com wrote:
I'm working with NHIS survye data. I'd like the to use muliple imputation
to cover the missing data for the
look up imputation on survey data might be helpful
On Thu, Jun 13, 2013 at 10:45 AM, Bert Gunter gunter.ber...@gene.comwrote:
Is this an R question?
Seems like it belongs on a statistical or survey list, not r-help.
Cheers,
Bert
On Thu, Jun 13, 2013 at 10:37 AM, Scott Raynaud
I paln on using R to do the imputation once I figure out how to do it.
- Original Message -
From: Bert Gunter gunter.ber...@gene.com
To: Scott Raynaud scott.rayn...@yahoo.com
Cc: r-help@r-project.org r-help@r-project.org
Sent: Thursday, June 13, 2013 12:45 PM
Subject: Re: [R] Survey
Could you share the results of sessionInfo() and str(alllev)?
Also please share the exact in- and output with relevant error
messages; for example 'cntnew:male' does not make much sense without
context.
Unfortunately I don't understand your model specification and is lost
in the interpretation
R users have a few choices of how to connect to their Oracle Database.
The most commonly seen include: RODBC, RJDBC, and ROracle. However,
these three packages have significantly different performance and
scalability characteristics which can greatly impact application
development. This blog
See Lumley's text Complex Surveys, chapter 9: Missing Data. In addition to
the survey package he also uses teh RSQLite and mitols packages in his worked
examples. He doesn't use the NHIS data for the missing data chapter, but he
does provide examples using NHIS for other tasks.
--
David.
On
Hi Spencer,
Thanks for the pointers.
I just wanted to share with you that we made a website over the weekend
that allows instant search of the R documentation on CRAN, see:
www.Rdocumentation.org. It's a first version, so any
feedback/comments/criticism most welcome.
Hi,
May be this helps:
source(Ye_data.txt)
dim(dat1)
#[1] 44640 3
library(xts)
xt1- xts(dat1[,-1],strptime(dat1[,1],%m/%d/%Y %H:%M))
xtSub-xt1[T00:00:00/T08:00:00]
dim(xt1)
#[1] 44640 2
dim(xtSub)
#[1] 14911 2
lst1-split(xtSub,as.Date(index(xtSub)))
sapply(lst1,function(x) {indx-
Dear All,
I am struggling with a linear model and an allegedly trivial data set.
The data set does not consist of categorical variables, but rather of
numerical discrete variables (essentially, they count the number of times
that something happened).
Can I still use a standard linear
Lorenzo:
1. This is a statistics question, not an R question.
2. Your statistical background appears inadequate -- it looks like
Poisson regression, which would fall under generalized linear
models. But it depends on how discrete discrete is (on some level,
all measurements are discrete,
On Jun 13, 2013, at 18:32, Duncan Murdoch murdoch.dun...@gmail.com wrote:
On 13/06/2013 11:59 AM, Pooya Lalehzari wrote:
Hello,
If I use set.seed(x) to set a seed for the random number generator, how can
I undo that to revert a random output every time I run my code?
If you remove
I asked a similar question earlier in the year,
http://r.789695.n4.nabble.com/How-to-stop-set-seed-besides-exiting-out-of-R-td4661717.html
I liked this solution from William,
rm(list=.Random.seed, envir=globalenv())
Mike
On Thu, Jun 13, 2013 at 5:27 PM, Michael Weylandt
Dear Rxperts,
Is there a way to exclude NAs while computing the summary statistics using
tables package?
I would also like the count (length(x,na.rm=T) included for each column
...
a - data.frame(p=rep(c(A,B),each=10,len=30),
a=rep(c(1,2,3),each=10),id=seq(30),
b=round(log(runif(30,-10,20))),
Please ignore my previous message.I was able to figure out a solution..
here it is..
nlen - function(x) length(na.omit(x))
tabular(((p=factor(p))*(a=factor(a))+1) ~ (b + c)*
((N=nlen)+mean+sd),data=a)
Thanks,
Santosh
On Thu, Jun 13, 2013 at 4:16 PM, Santosh santosh2...@gmail.com wrote:
On Jun 13, 2013, at 2:21 PM, Bert Gunter wrote:
Lorenzo:
1. This is a statistics question, not an R question.
2. Your statistical background appears inadequate -- it looks like
Poisson regression, which would fall under generalized linear
models. But it depends on how discrete discrete
Thanks, David, I appreciate your help.
--
View this message in context:
http://r.789695.n4.nabble.com/odds-ratio-per-standard-deviation-tp4669315p4669501.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing
yes ,Ma in forecast package does works but when the data included NA,NAN or
INF ,it could not go on calculating the running
2013/6/12 Rui Barradas ruipbarra...@sapo.pt
Hello,
You can use, for instance, function ma() in package forecast.
# if not yet installed
#install.packages('forecast',
Hi,
Check if this works for you:
source(Ye_data.txt)
dim(dat1)
library(xts)
xt1- xts(dat1[,-1],strptime(dat1[,1],%m/%d/%Y %H:%M))
xtSub-xt1[T00:00:00/T08:00:00]
lst1-split(xtSub,as.Date(index(xtSub)))
res- do.call(rbind,lapply(lst1,function(x){indx-
Hi,
I have been struggling with the issue of merging data frames that have
common columns and have different dimensions. Although I made alot of
search about it on internet, I could not find any function that would
efficiently perform the required operation. So I would appreciate if anyone
Dear R users,
I use: mapImageData- get_map(source=google, c(lon=21, lat=57), zoom=6,
maptype=terrain)
to get ggmapTemp.png file in the directory. The problem is - some city and
park names overlay with my data points I want to plot on this map. Is there
a way to get the map without city, country
74 matches
Mail list logo