Displaying 20 results from an estimated 2000 matches similar to: "Factors to Columns"
2010 Apr 16
2
managing data and removing lines
Hi,
I am very new to R and I've been trying to work through the R book to gain a
better idea of the code (which is also completely new to me).
Initially I imputed my data from a text file and that seemed to work ok, but
I'm trying to examine linear relationships between gdist and gair, gdist and
gsub, m6dist and m6air, etc.
This didn't work and I think it might have something to do
2007 Feb 19
1
need help in reading TOMS observed ASCII data file
Hello R Users,
I am new to R.
I have two data sets i) TOMS aerosol optical depth(AOD) and ii) TOMS
ozone(O3).
>
> AOD data is on 1x1 grid and O3 data is on 5x5 grid.
>
> First I want to read AOD and O3 as it is and then I want to regrid AOD on
> 5x5 grid as O3.
>
> Reading is first problem.
>
> FIRST PROBLEM READING AOD:
>
> AOD data is in following format:
>
2006 Oct 15
1
gamma distribution don't allow negative value in GLMs?
Dear friends,
when i use glm() to fit my data, i use
glm(formula = snail ~ vegtype + mhveg + humidity + elevation + soiltem, *family
= Gamma(link = inverse),* data =a,))
It shows: error in eval(expr, envir, enclos) : *gamma distribution don't
allow negative value*.
But i use
result<-glm(formula = snail ~ vegtype + mhveg + humidity + elevation +
soiltem, family = poisson, data =a) #this
2008 Dec 21
2
data format issue
Dear all-
I have a dataset (see a sample below - but the whole dataset is June
2005 - June 2008). The "LST" format is "YYMMDDHHmm" and I would like to
get the hourly average of the "mph" for the summer months (spanning all
years). I have been trying to use "aggregate" but am not having much
success at all! any thoughts would be greatly appreciated.
2010 Sep 14
1
NA confusion (length question)
Hi folks,
I am running a very simple regression using
mylm <- lm(mass ~ tarsus, na.action=na.exclude)
I would like the use the residuals from this analysis for more
regression but I'm running into a snag when I try
cbind(mylm$residuals, mydata) # where my data is the original data set
The error tells me that it cannot use cbind because the length of
mylm$residuals is
2011 Feb 19
1
problem in plotting numeric x by POSIXt class with lattice
# hi all,
# I'm trying to plot temperatures by date in a trellis plot by their
stations
# I'm plotting the following data.frame
library(lattice)
h <- structure(list(station_name = structure(c(3L, 4L, 2L, 10L, 11L,
12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L,
8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L), .Label = c("Ashqelon",
"Beer Sheva",
2015 May 14
3
comportamiento de data.table al hacer calculos por grupos
Estimada comunidad tengo un problema del que no encuentro datos que me
ayuden mucho en la web.
Estoy haciendo calculos por grupos con data,table. Tengo un archivo
(zp.res) con tres columnas que clasifican los datos (sol, con, dia) y
una columna de datos numericos (media), de la siguiente forma:
sol con dia media
1: con 0 1 -22.6
2: con 0 1 -36.6
3: con 0 1 -35.6
y
2008 Jul 29
1
Howto Draw Bimodal Gamma Curve with User Supplied Parameters
Hi,
Suppose I have the following vector (data points):
> x
[1] 36.0 57.3 73.3 92.0 300.4 80.9 19.8 31.4 85.8 44.9 24.6 48.0
[13] 28.0 38.3 85.2 103.6 154.4 128.5 38.3 72.4 122.7 123.1 41.8 21.7
[25] 143.6 120.2 46.6 29.2 44.8 25.0 57.3 96.4 29.4 62.9 66.4 30.0
[37] 24.1 14.8 56.6 102.4 117.5 90.4 37.2 79.6 27.8 17.1 26.6 16.3
[49] 41.4 48.9 24.1
2007 Aug 20
1
Ask for functions to obtain partial R-square (squared partial correlation coefficients)
The partial R-square (or coefficient of partial determination, or
squared partial correlation coefficients) measures the marginal
contribution of one explanatory variable when all others are already
included in multiple linear regression model.
The following link has very clear explanations on partial and
semi-partial correlation:
http://www.psy.jhu.edu/~ashelton/courses/stats315/week2.pdf
In
2007 Feb 19
0
problem in reading TOMS observed ASCII data file
Hello R Users,
I have two data sets i) TOMS aerosol optical depth(AOD) and ii) TOMS
ozone(O3).
AOD data is on 1x1 grid and O3 data is on 5x5 grid.
First I want to read AOD and O3 as it is and then I want to regrid AOD on
5x5 grid as O3.
Reading is first problem.
FIRST PROBLEM READING AOD:
AOD data is in following format:
#########
Latitute: 89.5
167 0 0 0 0 0 182 0 0 0 0 0 0 0 0 0 0 0 0 200
2011 May 09
2
Using NULL to my data?
Dear R users,
I am reading data from a file where there are some missing that are
represented by -9999.00.
I am using the command below.
=====My original data ===========
PARM = TMPC;T12X;T12N;DWPC;PALT;SKNT;DRCT;P24M;CLCL
STN YYMMDD/HHMM TMPC T12X T12N DWPC PALT
SKNT
DRCT P24M CLCL
820420 110429/1200 22.50 -9999.00
2008 Oct 09
1
YALAQ - Yet Another LApply Question
Hello,
Two lapply questions (system info and sample data below):
1) Why does the first form of command1 add the name of y _after_ the
str() output rather than before as does the second (preferred) form?
# command1 version1
invisible(lapply(ls(pattern='bn'), function(y) cat(y, "\n",
str(get(y)), "\n") ))
# command1 version2 (preferred output)
2008 Jan 27
2
Likelihood optimization numerically
Dear List,
I am not sure how should i optimize a log-likelihood numerically:
Here is a Text book example from Statistical Inference by George Casella, 2nd
Edition Casella and Berger, Roger L. Berger (2002, pp. 355, ex. 7.4 # 7.2.b):
data = x = c(20.0, 23.9, 20.9, 23.8, 25.0, 24.0, 21.7, 23.8, 22.8, 23.1, 23.1, 23.5, 23.0, 23.0)
n <- length(x)
# likelihood from a 2 parameter Gamma(alpha,
2005 Mar 08
1
coefficient of partial determination...partial r square [ redux]
If I'm not mistaken, partial R-squared is the R^2 of the quantities plotted
in a partial residual plot, so you can base the computation on that. Prof.
Fox's `car' package on CRAN has a function for creating those plots, but you
need to figure out the way to extract the quantities being plotted.
[In any case, the basic tools for doing such computations are all in R, and
it
2015 May 08
3
pregunta
Estimados
Al dirigir la lectura de un folder tYA1.csv me da este error y no me percato del motivo, adjunto archivo. Espero su ayuda
Saludos
Jos?
> setwd("D:/Public/Documents/R/bioimpedancia")
> a<-read.csv("tYA1.csv",header=TRUE, sep=",", dec=".")
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
more
2012 Jul 06
4
differences between survival models between STATA and R
Dear Community,
I have been using two types of survival programs to analyse a data set.
The first one is an R function called aftreg. The second one an STATA
function called streg.
Both of them include the same analyisis with a weibull distribution. Yet,
results are very different.
Shouldn't the results be the same?
Kind regards,
J
--
View this message in context:
2009 Feb 20
3
mean over previous cells
Dear RUsers,
I guess this is an easy question for someone a little familiar with
programming...(which I am not)...
I've got 2 colummns, one shows just dates(SST_date, Class 'Date' num), the
other one shows the SeaSurfaceTemperature (SST, num) at that certain date.
SST_date SST
2008-01-01 22.2
2008-01-02 21.8
2008-01-03 22.8
2008-01-04 22.9
2008-01-05 23.1
2008-01-06 23.2
...
2006 Apr 07
1
Aggregating an its series
I'm using a very long irregular time-series of air temperature and
relative humidity of this kind (this is an extract only)
its.format("%
Y%d%m %X)
> base
T H
20020601
12.00.00 27.1 47
20020601 15.00.00 29.1 39
20020601 18.00.00 27.4 39
20020601 21.00.00 24.0 40
20020602 0.00.00 22.0 73
20020602 3.00.00
19.2 49
20020602 6.00.00 19.5 74
20020602
2010 Dec 07
3
understanding output of tapply/by cumsum
Dear R-users,
I have a dataset with categories and numbers.
I would like to compute and add cumulative numbers
to the dataset.
I do not understand the structure of by(...) or
tapply(...) output enough to handle it.
Here a small example
--------------
d<-expand.grid(a=1:5,b=1:3,c=1:2)
d$n = 10 * d$a + d$b +0.1* d$c
Sn<-by(d$n,list(d$a,d$c),cumsum)
str(Sn)
---------
List of 10
$ : num
2007 Apr 20
2
sorting data in R
hello,
I'd like know how to sort a data frame in R for example how I should do to sort by Catholic with swiss data frame like below
thanks
Fertility Agriculture Examination Education Catholic Infant.Mortality
Courtelary 80.2 17.0 15 12 9.96 22.2
Delemont 83.1 45.1 6 9 84.84 22.2