Displaying 20 results from an estimated 500 matches similar to: "Fitting linear models"
2011 Nov 29
5
Why Numeric Values Become Factors in Data Frame
I have a data frame with 1 factor, one date, and 37 numeric values:
str(waterchem)
'data.frame': 3525 obs. of 39 variables:
site : Factor w/ 64 levels "D-1","D-2","D-3",..: 1 1 1 1 1 ...
$ sampdate : Date, format: "2007-12-12" "2008-03-15" ...
$ CO3 : num 1 1 6.7 1 1 1 1 1 1 1 ...
$ HCO3 : num 231 228 118 246
2009 Jul 25
1
yaxp problem for more irregular time series in one plot
Good day,
I'm trying to get more time series in one plot. As there are bigger
differences in values of variables I need logaritmic y axis.
The code I use is the following:
nvz_3_data <- read.csv('/home/tomas/R_outputs/nvz_3.csv')
date <- (nvz_3_data$date)
NO3 <- (nvz_3_data$NO3)
NH4 <- (nvz_3_data$NH4)
date_p <- as.POSIXct(date, "CET")
par(mfrow=c(2,1), ylog
2009 Sep 11
1
format (?) problems with data imported from postgres
Good day,
I read some data from a PostgreSQL database by a following script:
library(Rdbi)
library(RdbiPgSQL)
# conn becomes an object which contains the DB connection:
conn <- dbConnect(PgSQL(), host="localhost", dbname="BVS",
user="postgres", password = "*******")
query_duj_kal <- dbSendQuery(conn, "select zdroj as well, cas as date,
fe2,
2009 Sep 13
2
zoo plot: yearly marks on X-Axis
On Sun, 2009-07-26 at 13:17 +0200, Poersching wrote:
> stvienna wiener schrieb:
> > Hi all,
> >
> > I am plotting a financial time series, but I need a more detailed X-Axis.
> >
> > Example:
> > x <- zoo(rnorm(1:6000), as.Date("1992-11-11")+c(1:6000))
> > plot(x)
> >
> > The X-Axis is labeled "1995", "2000"
2011 Oct 09
1
sapply(pred,cor,y=resp)
Hello. I am wondering why I am getting NA for all in cors=sapply(pred,cor,y=resp). I suppose that each column in pred has NAs in them. Is there some way to fix this? Thanks
> str(pred)
'data.frame': 200 obs. of 13 variables:
$ mnO2: num 9.8 8 11.4 4.8 9 13.1 10.3 10.6 3.4 9.9 ...
$ Cl : num 60.8 57.8 40 77.4 55.4 ...
$ NO3 : num 6.24 1.29 5.33 2.3 10.42 ...
$ NH4 : num 578
2009 Feb 03
3
Boxplots by variable
Dear R users,
I have a matrix "final" which looks like this:
final
oSO4 oNO3 mSO4 mNO3
[1,] 3.3728 0.2110 1.9517421 1.01883602
[2,] 0.8249 0.0697 1.5970292 0.11368781
[3,] 0.2636 0.1004 0.6012445 0.24356332
[4,] 8.0072 0.3443 6.1016998 3.63207149
[5,] 13.5079 0.6593 12.4011068 1.55323386
[6,] 6.1293 0.1989 5.7620926 0.12884845
[7,] 0.6004 0.0661
2009 Apr 14
2
Controlling widths in write.fwf()
Is there a way to handle the widths of values being written to a file
using wrtite.fwf() ?
For example, I used read.fwf(file, width.vector) to read a file. After
making the necessary data manipulation, I want to write the data to a
new file in the same width.vector format. Is there a way to specify
this?
Thanks in Advance
Aparna
[[alternative HTML version deleted]]
2011 Jan 10
3
Help with Data Transformation
Greetings,
I am new to R and am having trouble with parsing a file with the following characteristics:
* Individual results for a single sample are written to multiple lines.
* First 16 columns are constant from sample to sample.
* Remaining 10 need to be matched up (cross-tabbed?)
o (the exact contents for the remaining 10 vary from sample to sample, as indicated in
2005 Dec 08
2
'mean' and 'sd' calculations do not match
Dear list,
I am using R 2.1.1 on a Fedora 3 Linux, 32 bit PC.
If I compute the aggregated mean and the standard deviation I get
standard deviation values for factors where the mean was not computed.
It seems to me that this is somehow related to the NA values. But I
don't quite understand what is going wrong?
Could it be related to the data import already? Some of the imported
data got the
2009 Apr 22
2
Exporting objects plotted with plot3d() - rgl package
Dear all,
Can anybody tell me how to export a 3d figure made with the plot3d
function? I'm careless about whether it's still interactive or not in
another format, as long I can get it out of R.
Thanks!
Alejandro Gonz?lez
Departamento de Biodiversidad y Conservaci?n
Real Jard?n Bot?nico
Consejo Superior de Investigaciones Cient?ficas
Claudio Moyano, 1
28014 Madrid, Spain
Tel +0034
2011 Oct 31
1
reshape2: Lost Values Between melt() and dcast()
Working with 5 subset streams from my source data frame, three of them
successfully call dcast(), but two fail:
jerritt.cast <- dcast(jerritt.melt, site + sampdate ~ param)
Aggregation function missing: defaulting to length
and
winters.cast <- dcast(winters.melt, site + sampdate ~ param)
Aggregation function missing: defaulting to length
Yet both data frames have the values in their
2009 Feb 03
3
non linear regression with nls
Hello,
I'm a beginner with R and it's the first time I'm using the R-help list... I hope I'm in the right place, if not:
Sorry!!
I need to do non linear regressions on a data set which columns are:
"river.name" "Portata" "PTG.P" "PO4.P" "NT.N" "NH4.N" "NO3.N" "BOD5" "SiO2"
2009 Feb 06
1
Tables in legend
I need to create a legend for a simple scatter plot in the following
format.
This is Blah1 number1 number2
This is Blah2 number3 number4
.
.
.
This is Blah6 number11 number12
I looked up these help pages and found the following solution.
lStr<-c(Blah1, Blah2,....Blah6, number 1, number2, ...number12)
legend(x="topright",lStr,ncol=3)
So this creates the tabular format I am
2009 Feb 27
1
Large 3d array manipulation
I have a large 3 dimensional array of size (243,246,768)
The first dimension is Rows, second is columns and the third is Time.
So for each row and column, I want to calculate the mean of time steps
1:8, 2:9, 3:10 and so on and assign the values to a new array. For this
I am using the following script.
for(i in 1:243)
{
for(j in 1:246)
{
for(k in 1:768)
{
newVar[i,j,k] <- mean(
2011 Nov 02
2
Proper Syntax for Logical Subset in Subset()
I have measured values for 47 chemicals in a stream. After processing
the original data frame through reshape2, the recast data frame has this
structure:
'data.frame': 256 obs. of 47 variables:
$ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 1 2 2 2 2 2 2 2
...
$ sampdate : Date, format: "1996-04-19" "1996-05-21" ...
$ Acid :
2017 Jun 10
2
Changing the name of a compressed file
Ok, I added zlib to imap protocol.
protocol imap {
?
mail_plugins = $mail_plugins zlib
}
Now both imap and lmtp protocols have zlib plugin enabled, and both send and receive mail is compressed.
Peter
> On 10 Jun 2017, at 6:50 pm, Aki Tuomi <aki.tuomi at dovecot.fi> wrote:
>
> Please check that you are not overwriting mail plugins for lmtp. Or post your doveconf -n.
>
2011 Nov 09
4
Interpreting Multiple Linear Regression Summary
I would appreciate pointers on what I should read to understand this
output:
summary(lm(TDS ~ Cond + Ca + Cl + Mg + Na + SO4))
Call:
lm(formula = TDS ~ Cond + Ca + Cl + Mg + Na + SO4)
Residuals:
ALL 1 residuals are 0: no residual degrees of freedom!
Coefficients: (6 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) 125 NA
2017 Jun 10
3
Changing the name of a compressed file
Not sure what you mean. I?m using lmtp to send messages to Dovecot from Postfix.
> On 10 Jun 2017, at 6:08 pm, Aki Tuomi <aki.tuomi at dovecot.fi> wrote:
>
> What's your LDA?
>
> Aki
>
>> On June 10, 2017 at 11:01 AM Peter West <lists at pbw.id.au> wrote:
>>
>>
>> Thanks for that Aki.
>>
>> Follow-up question. I tried to
2017 Jun 11
2
Unix socket for quota-status?
The example configs for quota-status use inet_listener. Does quota-status support unix sockets?
--
Peter West
pbw at pbw.id.au
And the great throng heard him gladly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL:
2008 Sep 01
3
how to read multiple lines per case
How can I read a space-delimited file, where the data values for each case
are folded before column 80, and so appear on two lines for each case?
The first few cases look like this
loc type bio H2S sal Eh7 pH buf P K Ca Mg Na Mn Zn Cu NH4
OI DVEG 676 -610 33 -290 5.00 2.34 20.238 1441.67 2150.00 5169.05 35184.5
14.2857 16.4524 5.02381 59.524
OI DVEG 516 -570 35 -268 4.75 2.66 15.591 1299.19