anna_l wrote:
Hello, I am having trouble by using the write.table function to write a
data frame of 4 columns and 7530 rows. I don´t know if I should just use
a sep=\n and change the .xls file into a .csv file. Thanks in advance
Base R cannot write .xls files by it's self. You should
hello,
sep=\n will seperate each column by \n which is not what you want.
I think a csv would be the best solution.
write.table(yourdataframe,sep=,)
or use write.csv directly.
regards,
stefan
On Mon, Nov 16, 2009 at 11:49:28AM -0800, anna_l wrote:
Hello, I am having trouble by using the
On Nov 16, 2009, at 2:53 PM, Jack Luo wrote:
David,
Thanks for your reply. Since I am kinda new to this forum, could you
please advise me on where to read those questions in R-help?
http://search.r-project.org/nmz.html
anna_l wrote:
Hello, I am having trouble by using the write.table function to write a data
frame of 4 columns and 7530 rows. I don´t know if I should just use a
sep=\n and change the .xls file into a .csv file. Thanks in advance
-
Anna Lippel
new in R so be careful I should be asking a
On Nov 16, 2009, at 3:06 PM, smu wrote:
hello,
sep=\n will seperate each column by \n which is not what you want.
I think a csv would be the best solution.
write.table(yourdataframe,sep=,)
Excel will also read (and even prefers in some sense) tab delimited
files, so:
On 16-Nov-09 19:22:10, Jack Luo wrote:
Hi,
I am trying to fit a logistic regression using glm, but my
explanatory variables are of mixed type: some are numeric,
some are ordinal, some are categorical, say
If x1 is numeric, x2 is ordinal, x3 is categorical, is the
following formula OK?
I would use pkg:plyr, but just to show how
versatile R is:
ind - cumsum(rle(as.numeric(dat$Name))$lengths)
dat[ind, ]
where I'm assuming that your data frame is
called 'dat'.
-Peter Ehlers
Hao Cen wrote:
Hi,
I would like to extract the last row of each group in a data frame.
The data
On Nov 16, 2009, at 3:13 PM, David Winsemius wrote:
On Nov 16, 2009, at 3:06 PM, smu wrote:
hello,
sep=\n will seperate each column by \n which is not what you want.
I think a csv would be the best solution.
write.table(yourdataframe,sep=,)
Excel will also read (and even prefers in
Tobias
The grangertest function in the lmtest package might be simpler for your
application.
Regards
Schalk Heunis
On Mon, Nov 16, 2009 at 5:31 PM, tobiasfa tobias.farnly...@gmail.comwrote:
Hi useRs..
I cant figure out how to test for causality using causality() in vars
package
I have
On 16 November 2009 at 11:42, Blair Christian wrote:
| I have k identical parallel pieces of code running, each using n.rand
| random numbers. I would like to use the same RNG (for now), and set
| the seeds so that I can guarantee that there are no overlaps in the
| random numbers sampled by the
I am receiving an error when trying to connect to the Oracle Database using
RODBC on a 64-bit Windows Server OS. The version of R is 2.10.0-win32.exe
Is this the wrong version. Does RODBC only work with 32-bit ODBC drivers?
've read over all the posts and documentation manuals.
The system is
Thanks David.
My code is ok if I did not wrap it up. The problem poped up after i make it
as a function.
In my step() call, i just make it a little bit more general.
I do not like stepwise method too, but need it as a comparison.
samer
On Mon, Nov 16, 2009 at 3:03 PM, David Winsemius
Hi,
I am using a script to initialize variables in the global workspace.
Based on some condition, I would like to stop evaluation of a script
sourced on the command-line, without issuing an error.
My current solution is the following hack that uses a repeat { }
statement
--- init.R
On Nov 16, 2009, at 2:39 PM, helpme wrote:
I am receiving an error when trying to connect to the Oracle
Database using
RODBC on a 64-bit Windows Server OS. The version of R is 2.10.0-
win32.exe
Is this the wrong version. Does RODBC only work with 32-bit ODBC
drivers?
've read over all
Try this:
x - rexp(100, 1/3)
xp - scale(x)
cor.mat - rbind( c(1, 0.8, 0.7), c(0.8, 1, 0.3), c(0.7, 0.3, 1) )
x23 - matrix( rnorm( 100 * 2, 1/3 ), ncol=2 )
x23 - cbind(xp, scale(x23))
x23 - x23 %*% solve(chol(var(x23))) ## skip if you don't want exact cor's
x.new - x23 %*% chol(cor.mat)
You should be able to do this effectively in 1 line:
my.data - lapply( paste( 'data', 1:N, '.dat', sep='' ), read.table )
Then everything is in my.data, if you want them named then do a second line:
names(my.data) - paste( 'data', 1:N, '.dat', sep='' )
Doing the same analysis on each dataset
I don't think that the p-value concept is as well defined for multivariate
distributions. Do you want the area under the curve corresponding to (x t.x
y t.y) or (x t.x | y t.y) or ( t.x + t.y C ) or all the area where
the height of the density is less than at t.x,t.y? or possibly others
If t1-t5 are all correlated with the outcome and with each other, than which
are significant will depend on variations in the data (it is possible to have a
set of values t1-t5 that predict the outcome well, but which all have
nonsignificant p-values when taking the others into account).
Hi All,
I was hoping someone could save me the trouble of reading through source code
and answer a quick question of mine regarding poly(). Does the poly() function
use a classical orthogonal polynomial series to fit polynomial models, or does
poly() generate a unique series of orthogonal
The actual code for the lda example is below. If anyone can reproduce the
error,
let me know. Thanks.
library(MASS)
Iris - data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),
Sp = rep(c(s,c,v), rep(50,3)))
train - sample(1:150, 75)
table(Iris$Sp[train])
z - lda(Sp ~ .,
Gurus:
I keep seeing other people¹s code that contain ideas like
If (x == 2L)
X[-1L]
X - 1L
I have some idea of what¹s going on, but where is the use of concepts like
³2L² documented?
Thanks, Bryan
*
Bryan Hanson
Acting Chair
Professor of Chemistry Biochemistry
DePauw University,
Try this:
aggregate(DF[-1], DF[1], tail, 1)
Name Value
1A 3
2B 8
3C 2
4D 3
On Mon, Nov 16, 2009 at 2:42 PM, Hao Cen h...@andrew.cmu.edu wrote:
Hi,
I would like to extract the last row of each group in a data frame.
The data frame is as follows
Name
On Nov 16, 2009, at 6:22 PM, Bryan Hanson wrote:
Gurus:
I keep seeing other people’s code that contain ideas like
If (x == 2L)
X[-1L]
X - 1L
I have some idea of what’s going on, but where is the use of
concepts like
“2L” documented?
Not sure where exactly, and it would depend on where
Bryan Hanson wrote:
Gurus:
I keep seeing other people¹s code that contain ideas like
If (x == 2L)
X[-1L]
X - 1L
I have some idea of what¹s going on, but where is the use of concepts like
³2L² documented?
In the R Language Definition manual. In this case, look in section
3.1.1,
That doesn't necessarily follow since the various methods don't use
Excel itself to create the csv file.
On Mon, Nov 16, 2009 at 1:22 PM, cls59 ch...@sharpsteen.net wrote:
Gabor Grothendieck wrote:
You could try one of the other methods of reading Excel files and see
if they are affected:
Hello,
I am using the lmomco package (lmom.ub and pargev) to compute the GEV
parameters (location, scale, and shape), which are used to estimate
return values. I was wondering how/if I can calculate upper and lower
confidence (CI_u, CI_l) intervals for each return frequency using the
GEV
?NumericConstants
will bring up a help page that mentions
All other numeric constants start with a digit or period and are either a
decimal or hexadecimal constant optionally followed by L.
and
An numeric constant immediately followed by L is regarded as an integer number
when possible
R users doing data analysis may be interested in the following paper:
http://methodsblog.wordpress.com/2009/11/13/first-paper-now-online/?utm_source=feedburnerutm_medium=feedutm_campaign=Feed%3A+wordpress%2Fmethodsblog+(methods.blog)
All data and R code is available.
Alain
-
I was missing something. Thx Dennis.
-- Forwarded message --
From: Dennis Murphy djmu...@gmail.com
Date: Tue, Nov 17, 2009 at 12:34 AM
Subject: Re: dendrogram
To: jorism...@gmail.com
Hi,
There are a couple of things you could do to pull the text back into
the dendrogram plot,
On 16/11/2009 6:47 PM, Steven McKinney wrote:
?NumericConstants
will bring up a help page that mentions
All other numeric constants start with a digit or period and are either a decimal
or hexadecimal constant optionally followed by L.
and
An numeric constant immediately followed by L is
On Mon, Nov 16, 2009 at 7:25 PM, Duncan Murdoch murd...@stats.uwo.ca wrote:
On 16/11/2009 6:47 PM, Steven McKinney wrote:
?NumericConstants
will bring up a help page that mentions
All other numeric constants start with a digit or period and are either a
decimal or hexadecimal constant
As the OP, I will say that I had deduced that it probably was a way of
specifying type integer, so I went to the ?integer page hoping for further
info. I agree there should be some kind of short comment or see also at
that page. I've been a self-taught user of R for about a year and a half,
and
I don't know how to do this in the way you describe.
Easy alternatives include:
- putting the part of the script that is to be executed
conditionally into a separate file, and then source it or not based
on some condition.
- simply wrapping the different parts of the script in if, then,
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: Monday, November 16, 2009 4:52 PM
To: Duncan Murdoch
Cc: Steven McKinney; R Help
Subject: Re: [R] Where are usages like == 2L documented?
On Mon, Nov 16, 2009 at 7:25 PM, Duncan Murdoch
Gabor Grothendieck wrote:
That doesn't necessarily follow since the various methods don't use
Excel itself to create the csv file.
I was trying to point out cases where I have seen this behavior and R wasn't
involved. Now that I think about it, I have observed to blank cells in a
Google
i have used excel almost exclusively to import data files and CSV is fine.
why dont you just go to the bottom of the excel sheet after you convert to
CSV and clean out the last rows, delete the end rows. also maybe try another
spread sheet program like open office, openoffice.org.
cls59 wrote:
On Sun, Nov 15, 2009 at 8:45 PM, Peng Yu pengyu...@gmail.com wrote:
gcc has options like -MM, which can generate the dependence files for
a C/C++ file that I can be used by gnu make. I'm wondering if there is
a tool that can generate dependence file for an R script.
For example, I have an R
Thanks to all who helped. These are all great suggestions.
Jeff
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: Monday, November 16, 2009 6:27 PM
To: Hao Cen
Cc: r-help@r-project.org
Subject: Re: [R] extracting the last row of each group in a data
JOIN YOUR COLLEAGUES FOR THE 20TH HIGHLY ACCLAIMED
INTERNATIONAL FORUM TO HEAR THE LATEST IMPLEMENTATIONS OF
BIOMETRICS...
THE WINTER 2010 BIOMETRICS SUMMIT:
Practical Implementation Strategies, Market Trends
And Best Practices In Government And Business
I want to do a non homogeneous poisson process model in R.
Any advice, or know of places where i can get some, ive googled it but
nothing came up relating to R.
--
View this message in context:
http://old.nabble.com/non-homogeneous-poisson-process-tp26378037p26378037.html
Sent from the R
Hi,
how can I parse Google search results? The following code returns
integer(0) instead of 1 although the results of the query clearly
contain the regex cran.
address - url(http://www.google.com/search?q=cran;)
open(address)
lines - readLines(address)
grep(cran, lines[3])
Thanks
still doesnt work ...
Karl Ove Hufthammer wrote:
On Thu, 12 Nov 2009 19:10:52 -0800 (PST) ychu066 ychu066
@aucklanduni.ac.nz wrote:
And I also want to save each histogram in each separate pdf file using
the
following codes ?.
png(hist.png[i])
dev.off()
Try
I have the following codes but can anyone make it shorter i.e making these
FOR loop into one loop ...
thanks...
par(mfrow=c(2,4))
for(i in 16:23){
hist(data[,i],main=paste(colnames(data)[i],sep=),ylab=Frequency,xlim=c(1,5),xlab=Score,ylim=c(0,100))
}
png(histogram.png)
here is the codes that i tried.
png(paste(hist,i,.png,sep=)
+ library(lattice)
Error: unexpected symbol in:
png(paste(hist,i,.png,sep=)
library
for(i in 8:153){
+ histogram(~ data[,i] | data[,2],
data=data,ylab=Frequency,xlim=c(1,5),xlab=Score,ylim=c(0,100)))
Error: unexpected ')' in:
Dear All,
How to do band-pass filters,low-pass filters,high-pass filters in R?
Thanks!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Dear All,
How to do Hodrick-Prescott Filter in R?
Thanks!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
I don't think this function is same as gcc's option -MM. Because gcc
checks pre-compile command #include, in which the filename can be
fetched definitely. But in your scenario, the filename may be from
some variables, which can not be determined by the R script only.
Maybe you can write a tool by
On Mon, 16 Nov 2009 10:43:38 -0500 Andrew Miles rstuff.mi...@gmail.com
wrote:
Thanks! Using the plyr package and the approach you outlined seems to
work well for relatively simple functions (like wtd.mean), but so far
I haven't had much success in using it with more complex descriptive
On Mon, 16 Nov 2009 19:54:08 -0800 (PST) ychu066 ychu066
@aucklanduni.ac.nz wrote:
here is the codes that i tried.
png(paste(hist,i,.png,sep=)
+ library(lattice)
Error: unexpected symbol in:
png(paste(hist,i,.png,sep=)
library
There is a missing ')' at the end of the first line.
If
101 - 149 of 149 matches
Mail list logo