Peter Dalgaard wrote:
> The first issue of the second volume of The R Journal will shortly be
> available at jour...@r-project.org/current.html. Thanks to everyone
As no less than 16 people has informed me, that of course wants to be
http://journal.r-project.org/current.html
(That's what you get
I managed with success to export a data frame of 367 columns and 37 rows to a
txt file, but unfortunately I couldn't manage the same with the transposed data
frame. Specifically, it seems like the notebook cannot "read" correctly 367
columns, so it reads the first 145 columns and it folds down
Hi,
Are there any implementations of stacked RBMs either complete or planned in
R?
Thanks,
Matthew
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin
As requested, here is some example data:
a=c("x","y","z")
b=c(1,5,8)
c=c(200010,535388,19929)
data=data.frame(a,b,c)
d=c("cat1","cat2","cat3")
b1=c(1,5,8)
c_start=c(20,50,60)
c_stop=c(201000,55,70)
category=data.frame(d,b1,c_start,c_stop)
I want to add a variable into data, w
Dear list,
I have a question about the interaction between R code and Latex language
trough the Sweave function in the package "utils".
What I'm trying to do is to write a report. Contrary to the examples shown in
the Sweave Manual in which table already constructed by R are "exported" on
Lat
In general, use cat (see help("cat")) for printing your output, e.g.
<>=
cat(levels(mydata$Firms)[mydata$Firms], "\n")
cat(mydata$Year, "\n")
# etc.
@
For your specific case you may also be interested in help("xtable",
package="xtable") along with the <<...,results=tex>>= Sweave construct.
F
On 2010-7-1 12:16, Jinsong Zhao wrote:
Hi there,
The following code can produce the correct type face, however, the Latin
character are displayed in GB1 font.
pdf("test_1.pdf", family = c("GB1"))
plot(1:10)
text(5,1, "\u4F60\u597D", font = 1)
text(5,2, "\u4F60\u597D", font = 2)
text(5,3, "\u4F6
On 01/07/10 08:50, Loukia Spin. wrote:
I managed with success to export a data frame of 367 columns and 37 rows to a txt file,
but unfortunately I couldn't manage the same with the transposed data frame.
Specifically, it seems like the notebook cannot "read" correctly 367 columns,
so it reads
I don't know of a native implementation, but you could probably use MDP
along with RPy or R/S Plus as suggested here:
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2628591/
Allan.
On 01/07/10 09:01, Matthew OKane wrote:
Hi,
Are there any implementations of stacked RBMs either complete or plann
Good day R-users,
I apologize for asking such an elementary question, but I could not
find an adequate response . I'm currently running a panel data analysis
i've used the plm package to perform the Tests of poolability as
results intercepts and coefficients are assumed different. so my
question
On 07/01/2010 03:29 AM, Dr. David Kirkby wrote:
On 03/ 1/10 12:23 AM, Sharpie wrote:
John Maindonald wrote:
I came across this notice of an upcoming webinar. The issues identified
in the
first paragraph below seem to me exactly those that the R project is
designed
to address. The claim that
2010/7/1 Pablo Cerdeira :
> *If not, can someone help me to find some brazilian map (with states)?*
You may look at:
http://www.gismaps.com.br/divpol/divpol.htm
and
ftp://geoftp.ibge.gov.br/mapas/malhas_digitais/
__
R-help@r-project.org mailing list
Good day R-users,
I apologize for asking such an elementary question, but I could not
find an adequate response . I'm currently running a panel data analysis
i've used the plm package to perform the Tests of poolability as
results intercepts and coefficients are assumed different. so my
question
On 07/01/2010 07:56 AM, Cable, Samuel B Civ USAF AFMC AFRL/RVBXI wrote:
Okay, here is a reproducible example of a possible solution (actually
it
probably does not do what you want but it's a start for discussion.
Note it is actual code and data which is what is needed.
===
Loukia,
Do you mean that the lines are wrapped when you open the file in
Notepad? Notepad seems to wrap lines after 1024 characters. Try to
open the file in a more decent editor, e.g. notepad++, gvim, ... and
there are probably plenty more editors available.
Hope this helps.
Jan
On Thu, Jul 1,
Hallo!
Is there a possibility to plot a number line in R?
I would like to display 3 different Intervals on the same number line. Ideally,
it would be possible to add a name to each number (e.g. Interval 1, lower
cut-off...and so on). I have not found a command for this.
Thank you for your help.
?segments
Do provide an example of the data and what you what to do with it.
On Thu, Jul 1, 2010 at 7:18 AM, Kroepfl, Julia
(julia.kroe...@uni-graz.at) wrote:
> Hallo!
>
> Is there a possibility to plot a number line in R?
> I would like to display 3 different Intervals on the same number line.
Hello
On Thu, Jul 1, 2010 at 1:12 AM, amatoallah ouchen wrote:
> serious issue for me . I'm currently running a panel data analysis
> i've used the plm package to perform the Tests of poolability as
> results intercepts and coefficients are assumed different. so my
>
The above is not very clear
Dear all,
I am a biologist. I have two sets of distance P(start1, end1) and Q(start2,
end2).
The distance will be like this.
P
Q
I want to know whether P falls closely to the right end or left end of Q.
P and Q are of dif
On Wed, 2010-06-30 at 18:02 -0300, afso...@unisinos.br wrote:
> Hi all,
>
>I am using the vegan package to run a prcincipal components analysis
> on forest structural variables (tree density, basal area, average
> height, regeneration density) in R.
>
>However, I could not find out how t
Hello,
If I understood well, you can compose that with "text" or "mtext" functions.
Regards,
Carlos.
On Thu, Jul 1, 2010 at 1:38 PM, jim holtman wrote:
> ?segments
>
> Do provide an example of the data and what you what to do with it.
>
> On Thu, Jul 1, 2010 at 7:18 AM, Kroepfl, Julia
> (julia
On 07/01/2010 09:18 PM, Kroepfl, Julia (julia.kroe...@uni-graz.at) wrote:
Hallo!
Is there a possibility to plot a number line in R?
I would like to display 3 different Intervals on the same number line. Ideally,
it would be possible to add a name to each number (e.g. Interval 1, lower
cut-off.
Here is a simple 'brute force' way to do it (assuming I understand what you
want)
==
text1 <- "Interval 1"
text2 <- "Inteval 2"
text3 <- "Interval 3"
ycord <- 3.3
plot(1:21, rep(3,21), type="l", xlab="Number Line", ylab="",yaxt="n")
On Jun 30, 2010, at 11:10 PM, Carlo Tambuatco wrote:
I noticed this running a few graphics demos the other day.
In particular the plotmath and the persp graphics demos, certain fonts
don't seem to render on the demos.
Three points:
1) The correct venue for questions that are likely due to fe
First of all, read the posting guide carefully :
http://www.R-project.org/posting-guide.html
Your question is far from clear. When you say that the lengths of P
and Q are different, you mean the length of the data or the difference
between start and end? That makes a world of difference.
Regarding
Suku,
It looks like you might want to consult with a [bio]statistician, but
I'm interested in what these distances represent. Can you give some
additional context for your problem? How were these distances collected?
Is it a collection of pairs of intervals, like this:
P
On Jul 1, 2010, at 7:53 AM, ravikumar sukumar wrote:
Dear all,
I am a biologist. I have two sets of distance P(start1, end1) and
Q(start2,
end2).
The distance will be like this.
P
Q
I want to know whether P falls clo
On Jul 1, 2010, at 9:00 AM, David Winsemius wrote:
On Jul 1, 2010, at 7:53 AM, ravikumar sukumar wrote:
Dear all,
I am a biologist. I have two sets of distance P(start1, end1) and
Q(start2,
end2).
The distance will be like this.
P
Q --
Dear R-helpers,
To start I would like to thank Prof. Harrell for package rms. It is
one of the most useful packages for R that I have encountered.
Turning to my problem, I encountered a surprising problem when working
with rms::ols. It seems that insulating terms in a formula by using
I() to insu
Sorry for posting to the R list.
P Q
12, 28 10, 42
2, 5 1, 55
32, 50 22, 63
. there are 1 points of P and Q.
The number of points of P and Q are equal (i,e 1).
The interval P always overlaps with Q. i,e start1https://stat.ethz.ch/mailman/listinfo
Try using psurvreg(x, mean=fit2$coef, scale=fit2$scale, dist='extreme')
The psurvreg and qsurvreg functions inherit the same parameterizations
as survreg. I have trouble myself matching the location/scale form of
survreg to default parameterizations used in the weibull, extreme, etc
distributions
Hi,
You need to define what you want more exactly--what are the possible
conclusions (hypotheses) you want to reach? Based on what you've said, I can
think of several different approaches you might want, but I'm not sure which
one of them you're actually after. For example:
Hypothesis A: The dist
There are three possibilities:
Case1: Left end
P--
Q--
Case2: Right end
P--
Q--
Case3: At mid position
P-
A--
My q
Hello.
Not an easy question at all, and it has little to do with software,
alas!
Veery loosely speaking: if the homogeneity hypothesis is rejected,
then, depending on data availability, you may still be able to treat the
data like a panel by:
a) ignoring the results of the poolability test
b
Dear Gabor,
Yours worked really well. For what it's worth, here is the final
product.
I also added a line or two to reconvert the dates back to written form
(October 15 2010).
require(chron)
dd <- seq(as.Date("INSERT FIRST DATE OF CLASSES IN TERM HERE"),
as.Date("INSERT LAST DAY OF CLASSE
Hi,
I am getting a warning message when I am fitting a generalized mixed model
(mod_2) and I don't understand why because when I add just an interaction
factor the model works perfectly (mod_1).
Does anyone know what it happpens ?
Thanks,
Aïda
Â
> mod_1<-lmer(sur15~soeviv15_4plus+frviv1
On Wed, 2010-06-30 at 15:24 -0700, Bert Gunter wrote:
> I nominate the below for a Fortune.
Seconded!
G
>
> -- Bert
>
> Bert Gunter
> Genentech Nonclinical Biostatistics
>
>
>
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behal
On Wed, 2010-06-30 at 11:17 -0700, Bert Gunter wrote:
> Just one small additional note below ...
>
> Bert Gunter
> Genentech Nonclinical Biostatistics
>
>
> "But a lot of academics are not going to "waste" their time documenting code
>
> properly, so others can reap the benefits of it. They wo
You have not shown any code on exactly how you use na.roughfix(), so I
can only guess.
If you are doing something like:
randomForest(y ~ ., mybigdata, na.action=na.roughfix, ...)
I would not be surprised that it's taking very long on large datasets.
Most likely it's caused by the formula inter
On Wed, 30 Jun 2010, Huso, Manuela wrote:
Dear R community,
I am new to R, a reforming SAS user :)
Welcome aboard!
I am running R 2.10.1 on a Windows XP machine. I would like to write
linear functions of my coefficient parameter estimates from a glm, but
am having a difficult time underst
I want my local libraries to have priority over the system installed
ones, which, as far as I can make out from help(".libPaths"), means they
have to come first in that list (it doesn't actually_say_ so, but that
seems to be the idea).
We have R_LIBS_USER which looks made for specifying where
For what its worth!
A good friend who also happens to be an ecologist
told me "An ecologist is a statistician who likes to be
outside".
Murray M Cooper, Phd
Richland Statistics
- Original Message -
From: "Gavin Simpson"
To: "Bert Gunter"
Cc:
Sent: Thursday, July 01, 2010 11:57 AM
S
Andy,
You're right, I didn't supply any code, because my call was very simple
and it was the call itself at question. However, here is the associated
code I am using:
naFixTime <- system.time( {
if (fltrResponse) { ## TRUE: there are no NA's in the
response... cleared v
On Thu, 1 Jul 2010, LogLord wrote:
As requested, here is some example data:
a=c("x","y","z")
b=c(1,5,8)
c=c(200010,535388,19929)
data=data.frame(a,b,c)
d=c("cat1","cat2","cat3")
b1=c(1,5,8)
c_start=c(20,50,60)
c_stop=c(201000,55,70)
category=data.frame(d,b1,c_start,c_stop)
Hi,
On Thu, Jul 1, 2010 at 10:24 AM, ravikumar sukumar
wrote:
> There are three possibilities:
>
> Case1: Left end
>
> P--
> Q--
>
> Case2: Right end
>
> P --
> Q--
>
>
> Case3:
Dear R helpers
I am working on the Bi-variate Normal distribution probabilities. I need to
double integrate the following function (actually simplified form of bivariate
normal distribution)
f(x, y) = exp [ - 0.549451 * (x^2 + y^2 - 0.6 * x * y) ]
where 2.696 < x < 3.54 and -1.51 < y < 1.98
I
Hi, I run into problem when writing a syntax, I don't know syntax that will
return true or false if an integer is odd or even.
Thanks
OYEYEMI, Gafar Matanmi
Department of Statistics
University of Ilorin
P.M.B 1515
Ilorin, Kwara State
Nigeria
Tel: +2348052278655
Tel: +2348068241885
Hi,
I'm using the function arima() from the ts package.
when the function gives me the output I can see the s.e. of the
coefficients.
However I cannot find a way to collect them in a object
estimate<-arima(x, order=c(1,0,1))
estimate$se does not work
in fact str(estimate) does not contain $se.
Hi,
I want to know the area under a curve, which is not given as a function, but
as values in a time series. It is not a smooth curve, but switches often
between positive values and zero (the values describe the moisture in the
soil over a year, one entry is one day). I already tried
area.betwee
On Jul 1, 2010, at 10:24 AM, ravikumar sukumar wrote:
There are three possibilities:
Case1: Left end
P--
Q--
Case2: Right end
P--
Q--
Case3: At mid position
P--
Hi,
i have a fairly large amount of genomic data. I have created a dataframe
which has "Reference" as one column and "Variation" as another. I want to
plot a ROC curve based on these 2 columns. I have serached the R manual but
I could not understand. Can anybody help me with the R code for plotti
On Thu, 1 Jul 2010, Yemi Oyeyemi wrote:
Hi, I run into problem when writing a syntax, I don't know syntax that
will return true or false if an integer is odd or even. Thanks
See
?"%%"
example("%%")
?"=="
HTH,
Chuck
OYEYEMI, Gafar Matanmi
[snip]
Charles C. Berry
You need to isolate the problem further, or give more detail about your
data. This is what I get:
R> nr <- 2134
R> nc <- 14037
R> x <- matrix(runif(nr*nc), nr, nc)
R> n.na <- round(nr*nc/10)
R> x[sample(nr*nc, n.na)] <- NA
R> system.time(x.fixed <- na.roughfix(x))
user system elapsed
8.4
On Jul 1, 2010, at 12:50 PM, ashu6886 wrote:
Hi,
i have a fairly large amount of genomic data. I have created a
dataframe
which has "Reference" as one column and "Variation" as another. I
want to
plot a ROC curve based on these 2 columns. I have serached the R
manual but
I could not und
Did you try googling on "R ROC function" (or something similar) or using the
RSiteSearch() function?
?RSiteSearch
RSiteSearch("ROC",restr="func")
Learn to use R's various search capabilities before posting, please!
Bert Gunter
Genentech Nonclinical Biostatistics
-Original Message-
On Jul 1, 2010, at 8:30 AM, Sarah Sanchez wrote:
Dear R helpers
I am working on the Bi-variate Normal distribution probabilities. I
need to double integrate the following function (actually simplified
form of bivariate normal distribution)
f(x, y) = exp [ - 0.549451 * (x^2 + y^2 - 0.6 *
On Jul 1, 2010, at 10:40 AM, Yemi Oyeyemi wrote:
> Hi, I run into problem when writing a syntax, I don't know syntax that will
> return true or false if an integer is odd or even.
> Thanks
x <- 1:10
> x
[1] 1 2 3 4 5 6 7 8 9 10
# modulo division
> x %% 2 == 0
[1] FALSE TRUE FALSE
simp() in the StreamMetabolism package may do the trick. I have used
this on time series of chemical constituent masses.
hth,
Stephen Sefick
On Thu, Jul 1, 2010 at 9:56 AM, suse wrote:
>
> Hi,
>
> I want to know the area under a curve, which is not given as a function, but
> as values in a time
On Jul 1, 2010, at 11:40 AM, Yemi Oyeyemi wrote:
Hi, I run into problem when writing a syntax, I don't know syntax
that will return true or false if an integer is odd or even.
Thanks
> 1:12 %% 2 == 0
[1] FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE
FALSE TRUE
OYEYEMI,
Try the ROCR package. http://rocr.bioinf.mpi-sb.mpg.de/ROCR.pdf
Saeed
On Thu, Jul 1, 2010 at 9:50 AM, ashu6886 wrote:
>
> Hi,
>
> i have a fairly large amount of genomic data. I have created a dataframe
> which has "Reference" as one column and "Variation" as another. I want to
> plot a ROC curve
On Jul 1, 2010, at 10:56 AM, suse wrote:
Hi,
I want to know the area under a curve, which is not given as a
function, but
as values in a time series. It is not a smooth curve, but switches
often
between positive values and zero (the values describe the moisture
in the
soil over a year
Regarding search,
There is also the "sos" packege.
And yesterday someone wrote a nice R code to enable searching inside
the description of all packages:
http://www.r-bloggers.com/cran-search/
Cheers,
Tal
Contact
Details:---
On Thu, 2010-07-01 at 08:40 -0700, Yemi Oyeyemi wrote:
> Hi, I run into problem when writing a syntax, I don't know syntax that will
> return true or false if an integer is odd or even.
> Thanks
>
> OYEYEMI, Gafar Matanmi
>
> Department of Statistics
>
> University of Ilorin
Hi Yemi!
Your pro
I can, after carefully reading about the returned values, see why
library("MASS", "MASS", character.only=TRUE)
has to chose between loading the package and displaying the help (I
thought I had found a nice shortcut), but wouldn't the documentation be
better if it said that the two are incompat
On Jul 1, 2010, at 1:24 PM, Allan Engelhardt wrote:
I can, after carefully reading about the returned values, see why
library("MASS", "MASS", character.only=TRUE)
has to chose between loading the package and displaying the help (I
thought I had found a nice shortcut), but wouldn't the docum
Thank you, seems to be the right thing for me. But what is this "n" for? The
number of iteration steps as mentioned on other pages for the simpson rule?
"number of divisions" as said on the help page I don't understand. ("a" and
"b" can be ignored, if I got it right?!). Thanks again!
stephen sef
Don't sorry about n it is only necessary for using a and b which are
the upper and lower limit of integration and n is the # of
sub-intervals. You can ignore all else and use x and y. I will fix
the documentation soon. I did a rather bad job on that help document.
kindest regards,
Stephen Sefic
OK…
My Grandfather, who was a farmer, was outstanding in his field…
Cheers…
Murray M Cooper, PhD wrote:
For what its worth!
A good friend who also happens to be an ecologist
told me "An ecologist is a statistician who likes to be
outside".
Murray M Cooper, Phd
Richland Statistics
- Orig
Suku,
Just to clarify, in your table and each of your images, it appears that
the start position of P (start1) is _after_ or at the start position of
Q (start2), and the end position of P (end1) is _before_ or at the end
position of Q (end2). If these positions represent increasing integers,
then
Read the ROCR package, it is very good.
On Thu, Jul 1, 2010 at 9:50 AM, ashu6886 wrote:
>
> Hi,
>
> i have a fairly large amount of genomic data. I have created a dataframe
> which has "Reference" as one column and "Variation" as another. I want to
> plot a ROC curve based on these 2 columns
Sarah Sanchez yahoo.com> writes:
>
> Dear R helpers
>
> I am working on the Bi-variate Normal distribution probabilities.
> I need to double integrate the following function
> (actually simplified form of bivariate normal distribution)
>
> f(x, y) = exp [ - 0.549451 * (x^2 + y^2 - 0.6 * x * y)
Thomas,
How popular is R inside of NOAA?
On Thu, Jul 1, 2010 at 11:25 AM, Thomas Adams wrote:
> OK
>
> My Grandfather, who was a farmer, was outstanding in his field
>
> Cheers
>
>
> Murray M Cooper, PhD wrote:
>
>> For what its worth!
>>
>> A good friend who also happens to be an ecol
Do you know to pass named command line arguments into an R script?
I have used littler and argv to pass a vector of arguments, but this
requires you to maintain the order of the arguments.
I'm wondering if there is a way to do this when you do not know the
order of the arguments being passed in.
Hi,
On Thu, Jul 1, 2010 at 2:49 PM, Bierbryer, Andrew
wrote:
> Do you know to pass named command line arguments into an R script?
>
> I have used littler and argv to pass a vector of arguments, but this
> requires you to maintain the order of the arguments.
>
> I'm wondering if there is a way to
On Thu, Jul 01, 2010 at 02:49:20PM -0400, Bierbryer, Andrew wrote:
> Do you know to pass named command line arguments into an R script?
>
> I have used littler and argv to pass a vector of arguments, but this
> requires you to maintain the order of the arguments.
Install the getopt package from C
Here is another approach using `integrate':
fvec = function(x, y) sapply(x, function(z, y)
exp(-0.549451*(z^2+y^2-0.6*z*y)), y=y)
gvec = function(x) sapply(x, function(y) integrate(fvec, lower=-1.51,
upper=2.696, subdivisions=1, rel.tol=1.e-08, y=y)$val)
> integrate(gvec, lower=1.98, upp
Hi all,
I am looking at the tutorial/appendix from John Fox on “Cox
Proportional-Hazards Regression for Survival Data” available here:
http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-cox-regression.pdf
I am particularly interested in modelling survival with time-dependent
covariates
Thank you for all your help. After some sleep last night, I started
fresh on the problem with a little clearer thinking. I thought over
what Jonathan had said... and I just decided to bypass indexing my
data after passing it through the embed function all together. I
still was able to perform t
On 07/01/2010 01:33 PM, Changbin Du wrote:
Read the ROCR package, it is very good.
Just be sure you really need an ROC curve. More often than not it gets
in the way of understanding.
Frank
On Thu, Jul 1, 2010 at 9:50 AM, ashu6886 wrote:
Hi,
i have a fairly large amount of genomi
Hi,
I am doing some computation which is pretty time consuming, I want R to
display CPU time after each iteration using the command Sys.time(). However,
I found that the code only began to display the CPU time after quite a while
and several iterations have finished. Is there a way to ask R to dis
Hello,
First let me apologize for replying/changing subject when I initially
asked this question. Its my first time using a mailing list of any sort!
I am trying to color particular labels on my lattice xyplot.
For example:
library(lattice)
z = data.frame(x = 1:5)
xyplot(x~x, z)
Is there an
Try to flush output after printing:
cat(paste(Sys.time()),"\n"); flush(stdout())
On Thu, 2010-07-01 at 16:17 -0400, Jack Luo wrote:
> Hi,
>
> I am doing some computation which is pretty time consuming, I want R to
> display CPU time after each iteration using the command Sys.time(). However,
> I
explicit call to print usually works for me.
library(audio)
for (i in 1:5){
wait(60)
print(Sys.time())
}
On Jul 1, 2010, at 4:30 PM, Matt Shotwell wrote:
> Try to flush output after printing:
>
> cat(paste(Sys.time()),"\n"); flush(stdout())
>
> On Thu, 2010-07-01 at 16:1
On Jul 1, 2010, at 4:29 PM, Andrew Liu wrote:
Hello,
First let me apologize for replying/changing subject when I
initially asked this question. Its my first time using a mailing
list of any sort!
I am trying to color particular labels on my lattice xyplot.
For example:
library(lattice)
On 2010-07-01 8:55, speretti wrote:
Hi,
I'm using the function arima() from the ts package.
when the function gives me the output I can see the s.e. of the
coefficients.
However I cannot find a way to collect them in a object
estimate<-arima(x, order=c(1,0,1))
estimate$se does not work
in f
Hmmm.
I guess I did something wrong since it does not work.
The file r2lhOutput.pdf is in the folder \inst\doc\
In the Rd file (for example in rthb.Rd) I add
"See \url{/library/r2lh/doc/r2lhOutput.pdf} for display detail."
But the link leads to a dead link.
I did not manage to find the file r2l
On Thu, Jul 1, 2010 at 1:24 PM, Allan Engelhardt wrote:
>
> Is there in the language a lexical x such that f(x, ...) is the same as f(,
> ...)?
>
Try this:
> mx <- formals(identity)$x
> missing(mx)
[1] TRUE
> sin(mx)
Error in sin(mx) : 'mx' is missing
___
Jim, Andy,
Thanks for your suggestions!
I found some time today to futz around with it, and I found a "home
made" script to fill in NA values to be much quicker. For those who are
interested, instead of using:
dataSet <- na.roughfix(dataSet)
I used:
Here's another version that's a bit easier to read:
na.roughfix2 <- function (object, ...) {
res <- lapply(object, roughfix)
structure(res, class = "data.frame", row.names = seq_len(nrow(object)))
}
roughfix <- function(x) {
missing <- is.na(x)
if (!any(missing)) return(x)
if (is.numer
Hadley,
Thanks! Yes... as.data.frame() is quite slow. (And it forces the
column names to become "acceptable" names, which is a hassle to fix all the
time.) I just hadn't thought of something as clever as what you wrote
below.
I'll try out this suggestion. :)
I'm a new R user so this is possibly a naive question. I'm trying to
load an external CSV file into a dataframe using:
df_name<-read.table("myfile.csv")
myfile.csv should have 5 elements per row, though a percentage are
missing the last two elements (the commas are present as placemarkers).
I have not been able to find a way to do dense rank in R
Here is an example of what I need
rank() gives the following
5 rank 1
7 rank 2
7 rank 2
9 *rank 4*
but I want
5 rank 1
7 rank 2
7 rank 2
9 *rank 3*
*
*
thanks
SS
[[alternative HTML version deleted]]
Tena koe Norman
The default separator for read.table is '' so you need to specify it as a comma:
dfName <- read.table("myfile.csv", sep=',')
or use read.csv().
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On
Norman Jessup wrote:
I'm a new R user so this is possibly a naive question. I'm trying to
load an external CSV file into a dataframe using:
df_name<-read.table("myfile.csv")
myfile.csv should have 5 elements per row, though a percentage are
missing the last two elements (the commas are pre
Thanks to Peter and Erik - This advice resolved my problem.
regards
Norman Jessup
On 2/07/10 11:43 AM, Erik Iverson wrote:
Norman Jessup wrote:
I'm a new R user so this is possibly a naive question. I'm trying to
load an external CSV file into a dataframe using:
df_name<-read.table("myf
On Jul 1, 2010, at 9:30 PM, Suresh Singh wrote:
I have not been able to find a way to do dense rank in R
Here is an example of what I need
rank() gives the following
5 rank 1
7 rank 2
7 rank 2
9 *rank 4*
but I want
5 rank 1
7 rank 2
7 rank 2
9 *rank 3
> tst <- read.table(textConnection("
> x <- c(5,7,7,9)
> rank(unique(x))[match(x, unique(x))]
[1] 1 2 2 3
On Thu, 2010-07-01 at 21:30 -0400, Suresh Singh wrote:
> I have not been able to find a way to do dense rank in R
>
> Here is an example of what I need
>
> rank() gives the following
>
> 5 rank 1
> 7 rank 2
> 7 rank 2
> 9 *ran
Are there packages that allow improved String and URL processing?
E.g. extract parts of a URLs such as sub-domains, top-level domain,
protocols (e.g. https, http, ftp), file type based on endings, check
if a URL is valid or not, etc...
I am currently only using split and paste. Are there better an
Ralf B wrote:
Are there packages that allow improved String and URL processing?
E.g. extract parts of a URLs such as sub-domains, top-level domain,
protocols (e.g. https, http, ftp), file type based on endings, check
if a URL is valid or not, etc...
I am currently only using split and paste. Are
HI, Dear R community,
I am using the xtable to create the table, but how can I see the table?
The following is the codes I used:
> data(tli)
> tli.table <- xtable(tli[1:10, ])
> digits(tli.table)[c(2, 6)] <- 0
> print(tli.table, floating = FALSE)
% latex table generated in R 2.11.0 by xtable
1 - 100 of 111 matches
Mail list logo