Displaying 20 results from an estimated 158 matches for "ozon".
Did you mean:
ozone
2012 Oct 19
3
Newly installed version; can't run lm function
New installation seems to have behavior I cannot figure out. Here is illustrative sequence where I load a small data set (test) from Crawley's files and try to run a simple linear model and get an error message. Oddly, R reports that the variable 'test$ozone' is numeric while, after attaching test, the variable ozone is not numeric. Can someone please help? This behavior is occurring with multiple data sets loaded from outside R. Thank you in advance.
Michael Grant
Example:
> test
ozone garden
1 3 A
2 5 B
3 4...
2010 May 26
3
shapiro.test
Hi,
I am not so sure about an error note I got when using shapiro.test.
I imported some data into R by wrinting it into a .txt file via
> tab1<-read.table("etc....txt",header=T)
> attach(tab1)
The following object(s) are masked _by_ .GlobalEnv :
ozon
> ozon$V1 [1] 2.5 3.0 5.6 4.7 6.5 6.7 1.7 5.3 4.6 7.4 5.4 4.1 5.1 5.6 5.4 6.1 7.6[18] 6.2 6.0 5.5 5.8 8.2 3.1 5.8 2.6
Now I wanted to use the shapiro.test:
> shapiro.test(ozon)
Fehler in sort.list(x[complete.cases(x)]) : 'x' must be atomic for 'sort.list'Have you called ...
2011 Dec 23
2
cast in reshape and reshape2
> library(reshape2)
> x = melt(airquality, id=c('month', 'day'))
With reshape I can cast with multiple functions:
> library(reshape)
> cast(x, month+variable~., c(mean,sd))
month variable mean sd
1 5 ozone 23.615385 22.224449
2 5 solar.r 181.296296 115.075499
3 5 wind 11.622581 3.531450
4 5 temp 65.548387 6.854870
5 6 ozone 29.444444 18.207904
6 6 solar.r 190.166667 92.882975
7 6 wind 10.266667 3.769234
8 6 temp 79.100000 6.598...
2013 Feb 17
3
Select components of a list
...pply(1:length(models),function(i) lapply(models[[i]],function(x) summary(x)$coef[2,]))[[1]] #1st list component
[[1]]
#??? Estimate?? Std. Error????? z value???? Pr(>|z|) # pm10
#5.999185e-04 1.486195e-04 4.036606e+00 5.423004e-05
#[[2]]
#??? Estimate?? Std. Error????? z value???? Pr(>|z|) #ozone
#0.0010117294 0.0003792739 2.6675428048 0.0076408155
#[[3]]
#??? Estimate?? Std. Error????? z value???? Pr(>|z|) #so2
#0.0026595441 0.0009352046 2.8438097399 0.0044577658
#pm10
do.call(rbind,lapply(1:length(models),function(i) do.call(rbind,lapply(models[[i]],function(x) summary(x)$coef[row...
2009 Oct 17
2
ozone data
Hi just a quick inquiry
Sorry if this is too trivial but I am just a beginner in R.
I am looking at the plyr package and I am intrigued at how data(i.e. ozone, baseball) is loaded without having to type data(ozone). Are they automatically loaded when i call library(plyr)? I want to do the same thing when I make my package. How does one accomplish this?
Also, are there any beginner guides on how to make a package?
Thank you all..
Cheers,
Julius TEsor...
2013 Nov 04
1
Subject: Regress multiple independent variables on multiple dependent variables
I want to estimate the effect of several independent variables on several
dependent
variables. In the example below I wanted to estimate the
effect of three independent variables on ozone and temperature. My aim is
to create a list of dependent and independent variables and automate the
process rather than writing every dependent and independent variable in
each model as I have done below.
Example data is provided by the following library:
library(faraway)
data(ozone)
mo3 <-...
2008 Mar 24
2
Newbie help with Sweave
...Leisch}
\usepackage{C:/PROGRA~1/R/R-26~1.2/share/texmf/Sweave}
\begin{document}
\maketitle
In this example we embed parts of the examples from the
\texttt{kruskal.test} help page into a \LaTeX{} document:
\begin{Schunk}
\begin{Sinput}
> data(airquality)
> library(ctest)
> kruskal.test(Ozone ~ Month, data = airquality)
\end{Sinput}
\begin{Soutput}
Kruskal-Wallis rank sum test
data: Ozone by Month
Kruskal-Wallis chi-squared = 29.2666, df = 4, p-value = 6.901e-06
\end{Soutput}
\end{Schunk}
which shows that the location parameter of the Ozone
distribution varies significantly from m...
2002 Apr 04
0
ozone.xy
Hi!
Where is ozone.xy? I've found ozone in package fields,
but cannot find ozone.xy
Actually, is there any way to find in which package
lives a particular
dataset (if the package is not installed in the local system?)
Thanks
Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
0802...
2007 Sep 16
1
Identifying objects from a data set
Hello
Given the following data for a data set called airquality. To identify the nature of the objects from the data set airquality example "Ozone" would it be best to use the command is. like is.character(airquality$Ozone) ....... I tried attributes(airquality$Ozone) but it came up null. Would there be a better way to identify these objects.
Thanking you in advance for your assistance with my question.
Ozone Solar.R Wind Temp Mo...
2017 Jun 26
2
Odd behaviour in within.list() when deleting 2+ variables
...seems to work and even simplify the
code.... will get back to the issue later in the evening.
Martin
> The crux of the matter seems to be that both the following
> constructions work for data frames
>> aq <- head(airquality)
>> names(aq)
> [1] "Ozone" "Solar.R" "Wind" "Temp" "Month" "Day"
>> aq[c("Wind","Temp")] <- NULL
>> aq
> Ozone Solar.R Month Day
> 1 41 190 5 1
> 2 36 118 5 2
&g...
2017 Jun 26
2
Odd behaviour in within.list() when deleting 2+ variables
The behaviour of within() with list input changes if you delete 2 or more variables, compared to deleting one:
l <- list(x=1, y=2, z=3)
within(l,
{
rm(z)
})
#$x
#[1] 1
#
#$y
#[1] 2
within(l, {
rm(y)
rm(z)
})
#$x
#[1] 1
#
#$y
#NULL
#
#$z
#NULL
When 2 or more variables are deleted, the list entries are instead set to NULL. Is this intended?
2011 Feb 02
1
update not working
R-help,
I'm using the "update" command for a multiple regression model and it is
just not working:
> update(model1, . ~ . – temp:wind:rad,data=ozone.pollution)
Error: unexpected input in "model2<-update(model1, . ~ . –"
> summary(model1)
Call:
lm(formula = ozone ~ temp * wind * rad + I(rad^2) + I(temp^2) +
I(wind^2), data = ozone.pollution)
Residuals:
Min 1Q Median 3Q Max
-38.894 -11.205 -2.736 8.80...
2005 Dec 05
1
need help with matrix manipulation
I hope my problem is not too basic to post here. I am a beginner having
problems with some matrix manipulation. The data I am working with are
sites with hourly ozone readings and is in a matrix where each row is a site
and each column is an hourly reading. So for 10 sites, one day's worth of
data is a 10x24 matrix - column 1 is the ozone measurement for midnight GMT,
column 2 is ozone at 1:00am GMT, etc.
My challenge is that I want to create a new mat...
2009 Mar 04
1
mapping lat and long with maps package
I am trying to overlay a data frame with lat and longitude(which refer to
zip codes) on the map of US that I get by using map ("states").
Is there anyway to do this or do I have to resort to using maptools?
thank you
[[alternative HTML version deleted]]
2008 Feb 12
3
fun.aggregate=mean in reshape
...e facing a problem while introducing ourselves to Reshape package
use. Melt seems to work fine, but cast fails when we use mean as
fun.aggregate. As you see here, length and sum work fine, but mean
throws this same error whatever dataset we use.
> cast(aqm, month ~ variable, length)
month ozone solar.r wind temp
1 5 26 27 31 31
2 6 9 30 30 30
3 7 26 31 31 31
4 8 26 28 31 31
5 9 29 30 30 30
> cast(aqm, month ~ variable, sum)
month ozone solar.r wind temp
1 5 614 4895 360.3 2032
2 6 265...
2018 Dec 12
2
Subset dentro de un for
...geom_path(data=map_data('world'), aes(x=long, y=lat,group=group))+
labs(title = paste("5026 Minimum number of IFd species to go
extinct"))))
}
Quoting Carlos Ortega <cof en qualityexcellence.es>:
> Esta es una forma...
>
>> for(i in c('Ozone', 'Solar.R')) {
> + print(i)
> + sub_data <- subset(airquality, eval(parse(text=i)) < 100)
> + res_ult <- mean(sub_data$Temp, na.rm = TRUE)
> + print(res_ult)
> + }
> [1] "Ozone"
> [1] 77.34862
> [1] "Solar.R"
> [1] 71.852...
2004 Apr 06
1
k nearest neighbours
...What I now do is
1) Create an n*m matrix C were I put the distances from all the points
in B to the points in A and make NA those cells were the distance is
larger than the radius. (The points are geographical locations so I use
function rdist.earth in package fields) e.g.:
library(fields)
data(ozone)
A<-cbind(ozone$lon.lat[1:10,])
B<-cbind(ozone$lon.lat+2)
C<-rdist.earth(A,B)
radius<-180 # The search radius
C[which(C>radius)]<-NA
2) Then I make NA everything but the k nearest ones
k<-5 # The nearest neighbours
rank<-function(rank){rank<-sort.list(sort.list(rank,))}...
2010 Nov 11
4
Troubleshooting sweave
...ave/
\documentclass[a4paper]{article}
\title{Sweave Example 1}
\author{Friedrich Leisch}
\begin{document}
\maketitle
In this example we embed parts of the examples from the
\texttt{kruskal.test} help page into a \LaTeX{} document:
<<>>=
data(airquality)
library(ctest)
kruskal.test(Ozone ~ Month, data = airquality)
@
which shows that the location parameter of the Ozone
distribution varies significantly from month to month. Finally we
include a boxplot of the data:
\begin{center}
<<fig=TRUE,echo=FALSE>>=
boxplot(Ozone ~ Month, data = airquality)
@
\end{center}
\end{do...
2001 Mar 22
1
two easy questions...
Hi all.
1) If I have a dataframe with variable names as follow: PC1 PC2 ... PCn and I want to pass only some of them to a function, e.g.
glm(resp~from PC1 to PC10, PC15, etc.,...)
is there a faster way than simply writing each variable name in the formula?
2) Again, I have a dataframe, say ali.df, with tha following variables: ali1, ali2, ...ali78
I want to sum, for example, ali1+al2+ali7+f rom
1997 Apr 29
0
R-alpha: frametools v.0.0000001
...they rely on R's scoping rules. Not that difficult to fix, though: The
nm vector and the "parsing" functions need to get assigned to
(evaluation) frame 1 (the "expression frame" of S), and preferably
removed at exit.
data(airquality)
aq<-airquality[1:10,]
select.frame(aq,Ozone:Temp)
subset.frame(aq,Ozone>20)
modify.frame(aq,ratio=Ozone/Temp)
Notice that in modify.frame(), any *new* variable must appear as a
tag, not as the result of an assignment, i.e.:
modify.frame(aq,Ozone<-log(Ozone)) works as expected
modify.frame(aq,lOzone<-log(Ozone)) does not.
This is...