Dear R users,
I have a very simple question and I've tried to search for the answer.
(But failed.)
there should be a function (func) that work like
> abc <- c(1,2,3,4)
> func(abc)
"abc"
I would like to know the name of that function. Thank you very much
for your help.
Regards,
CH
--
CH Chan
Cool. If you get some code working and don't mind sharing it please
post it here.
Michael
On 17 September 2010 16:49, Sunny Srivastava wrote:
> Thanks Michael for your help. At least its good to know that there is no
> function which does what I wanted. I will definitely try to code something
>
Thanks Michael for your help. At least its good to know that there is no
function which does what I wanted. I will definitely try to code something
that fulfills my requirements.
Regards,
S.
On Fri, Sep 17, 2010 at 2:32 AM, Michael Bedward
wrote:
> Hello Sunny,
>
> Defining groups at a given hei
Thanks so much! I realise that probably seems very simple to you, but you've
just saved me hours of struggling with syntax and commands I'm not very
familiar with...excellent.
Cheers,
Selthy
--
View this message in context:
http://r.789695.n4.nabble.com/Converting-tables-to-matrices-tp2543309p25
On 09/17/2010 12:14 AM, Jeremy Miles wrote:
>> I know from organizing a conference in Germany that the only really good way
>> was and is ordinary money transfer via BIC and IBAN numbers. Unfortunately,
>> this system is pretty unknown in the US. Europeans can easily use money
>> transfer to the R
Thanks all. But I was looking for "KMedian" algorithm and not the "KMedoids"
algorithm. The wiki says, " Note that this algorithm is often confused with
k-medoids, which finds the optimal medoid, not median, for each cluster. (A
medoid is an actual point from the dataset; a median is the mathema
Hello Sunny,
Defining groups at a given height can be done with the cut function
(see ?cut.dendrogram).
Unfortunately, cut doesn't give you the option of specifying a number
of clusters rather than a height in the way that cutree does for
"hclust" objects. Perhaps someone else here knows of a pac
Hi Jan
but I think this is how your code really works. Did you try it?
Regards
Petr
Jan private napsal dne 16.09.2010 13:22:05:
> Hello Petr,
>
> > If you want to get results of your function for a vector of reynolds
and
> > dk you can use function outer and probably get rid of for cycle in
Just expanding on Brians code to something that will work for vector.
age_years <- function(first, second)
{
lt <- data.frame(first, second)
age <- as.numeric(format(lt[,2],format="%Y")) -
as.numeric(format(lt[,1],format="%Y"))
first <
as.Date(paste(format(lt[,1],format="%Y"),"-",
Hello useRs,
I'm using the command "solnp" in package "Rsolnp" to solve a general nonlinear
programming problem. But I got an error that " the leading minor of order 15 is
not positive definite
". Can anybody tell what may cause this error? Does it have something to do
with the starting values
Hi folks,
Re: Installation of rgl and tkrplot
Problem solved as follows;
On Debian 504 64-bit console:-
$ sudo aptitude remove r-cran-rgl
$ sudo aptitude remove r-cran-tkrplot
$ sudo aptitude install libglu1-mesa-dev
$ sudo aptitude install tk8.5-dev
On R
1)
> install.packages("rgl", depen
Oops, that should have been result[[1]], not results[[1]]
On 17 September 2010 15:03, Michael Bedward wrote:
> Hello Selthy,
>
> Here's one way. Assume your tables are called x.trt and x.cont
>
> # form a single matrix
> x <- cbind(x.trt, x.cont)
> colnames(x) <- c("Ntrt", "BPtrt", "Ncon", "BPcon
Hello Selthy,
Here's one way. Assume your tables are called x.trt and x.cont
# form a single matrix
x <- cbind(x.trt, x.cont)
colnames(x) <- c("Ntrt", "BPtrt", "Ncon", "BPcon")
result <- apply( x, 1, function(xrow) fisher.test( matrix(xrow, nrow=2) ) )
Now result is a list where element i holds
Hi there,
I'm a real beginner to R. I have two tables of the following format (~1000
rows in each):
Table 1 (experimental)
Nbp
1064 12312089
856 12312234
Table 2 (control)
846334728908
879 34443290
.
I would like to do Fisher's exact tests comparing each row of th
On Sep 16, 2010, at 10:55 PM, lord12 wrote:
In order to use the extension csv, is the syntax:
write.table(table_list, file= paste("file", x, sep = "").csv, sep =
",") ?
Nope. You cannot just tack strings on the end of function calls. Try:
write.table(table_list, file= paste("file", x, ".
no.
Your best way is to use
write.csv(table_list, file = paste("file", x, ".csv", sep=""))
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of lord12
Sent: Friday, 17 September 2010 12:55 PM
To: r-help@r-project.org
Subject: Re: [R
In order to use the extension csv, is the syntax:
write.table(table_list, file= paste("file", x, sep = "").csv, sep = ",") ?
Also I pretty much create a table by
doing:
table_list= cbind(c1,c2,c3,c4) where c1...c4 are vectors.
--
View this message in context:
http://r.789695.n4.nabble.com
Sorry. Must've skipped over the posting guide in your reply. Pitfalls of
mobile posting. I'll retry this more correctly when I have all the
resources and code in front of me.
--
View this message in context:
http://r.789695.n4.nabble.com/Making-heatmaps-tp2543201p2543274.html
Sent from the
On Sep 16, 2010, at 10:22 PM, lord12 wrote:
I want to open the file in excel and I want the columns in my table
to be
lined up with the columns in excel.
Generally one would use an extension of .csv in that instance, and you
may need to move the column headers over one cell because the
On Sep 16, 2010, at 10:17 PM, lord12 wrote:
write.table(table_list, file= paste("file", x, sep = ""), sep = ",")
My output is still a file object.
Wasn't that the point?
--
View this message in context:
http://r.789695.n4.nabble.com/convert-to-csv-file-tp2543232p2543251.html
Sent from
On Sep 16, 2010, at 10:21 PM, wns09a wrote:
I didn't try to attach anything...
Just wondering what to do with the matrix after that.
You didn't post an example. image() and heatmap() are pretty similar,
as the help page for heatmap informs you in the first sentence. The
question is what
write.table(table_list, file= paste("file", x, sep = ""), sep = ",")
My output is still a file object.
--
View this message in context:
http://r.789695.n4.nabble.com/convert-to-csv-file-tp2543232p2543251.html
Sent from the R help mailing list archive at Nabble.com.
__
I want to open the file in excel and I want the columns in my table to be
lined up with the columns in excel.
--
View this message in context:
http://r.789695.n4.nabble.com/convert-to-csv-file-tp2543232p2543256.html
Sent from the R help mailing list archive at Nabble.com.
__
I didn't try to attach anything...
Just wondering what to do with the matrix after that.
--
View this message in context:
http://r.789695.n4.nabble.com/Making-heatmaps-tp2543201p2543254.html
Sent from the R help mailing list archive at Nabble.com.
__
Hi Bill,
Thanks for your advice.
OS - Debian 504 64-bit
$ apt-cache search rgl
r-cran-misc3d - GNU R collection of 3d plot functions and rgl-based isosurfaces
r-cran-rgl - GNU R package for three-dimensional visualisation using OpenGL
sanduhr - An alarm clock designed as an hourglass
$ sudo a
On Sep 16, 2010, at 9:04 PM, wns09a wrote:
Basically, I have the location data for about 1,000 pitches. I can
get them
to show up correctly on normal plots, but I am genuinely messed up on
heatmaps.
location <- read.csv('C:/Users/William/Downloads/09Location.csv')
location <- as.matrix(l
On Sep 16, 2010, at 9:49 PM, lord12 wrote:
I have a command:
write.table(table_list, file= paste("file", x, sep = "")) where x is
the
file name. How do I convert this file into a csv file in this
statement?
By using a sep argument of "," for write.table or using the pre-
packaged write.
I have a command:
write.table(table_list, file= paste("file", x, sep = "")) where x is the
file name. How do I convert this file into a csv file in this statement?
--
View this message in context:
http://r.789695.n4.nabble.com/convert-to-csv-file-tp2543232p2543232.html
Sent from the R help mail
On Sep 16, 2010, at 8:33 PM, btpagano wrote:
Hello All,
I am still a beginner with R, and I only have a week or two under my
belt so
far.
I'm working with NHANES anthropometric data on stature. I have two
sets of
data that have different statistical weights. I'm trying to combine
tho
Hello All,
I am still a beginner with R, and I only have a week or two under my belt so
far.
I'm working with NHANES anthropometric data on stature. I have two sets of
data that have different statistical weights. I'm trying to combine those
two data sets into one "mega-set" while retaining eac
Basically, I have the location data for about 1,000 pitches. I can get them
to show up correctly on normal plots, but I am genuinely messed up on
heatmaps.
> location <- read.csv('C:/Users/William/Downloads/09Location.csv')
> location <- as.matrix(location)
Like I said, that can get a plot fine
Hello R-Helpers,
I have a question about extracting the clusters of genes after we make the
heatmap (say ht4) using the heatmap.2 function. Basically, I want to get the
clusters which are shown as row dendrogram in the heatmap.
I understand that ht4$rowDendrogram is an object of dendrogram and it
It means that two of the packages on which "TeachingDemos" depends were not
installed correctly, namely "rgl" and "tkplot".
The problem could be that you do not have the system dependencies in place.
For rgl these are listed as:
SystemRequirements:OpenGL, GLU Library, zlib (optiona
On Thu, Sep 16, 2010 at 5:40 PM, Stephen Liu wrote:
>
> Hi folks,
>
>
> On R
>
>> install.packages("TeachingDemos", dependencies=TRUE)
> ..
> installing to /usr/local/lib/R/site-library/mapproj/libs
> ** R
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indice
Hi Group,
I have a possibly naive question, but it seems like it fits into this
discussion.
I have observed that when researchers publish findings that are deemed
to be high-impact,
generous funding often follows.
R is used everywhere, and, of course, for many of these projects. So
my naive que
Hi folks,
On R
> install.packages("TeachingDemos", dependencies=TRUE)
..
installing to /usr/local/lib/R/site-library/mapproj/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loa
On 09/16/2010 02:23 PM, darckeen wrote:
>
>>
> setClass("person",representation(age="numeric",weight="numeric"),prototype(age=NULL,weight=NULL))
> [1] "person"
>> bob <- new("person",age=30)
> Error in validObject(.Object) :
> invalid class "person" object: invalid object for slot "weight" in c
Hi there and thank you for reply.
I have been trying that, using mar to set margin around each plot and oma to
specify bottom space. However, it wont display the xlab.
Here's my code :
pdf(file="/home/persican/Desktop/test.pdf", width = 3.5, height = 5.6,
pointsize = 8);
par(mfcol = c(3,1), m
On Thu, 2010-09-16 at 17:30 -0400, Tal Galili wrote:
> Hello dear Jaroslaw,
> I strongly agree with you that the R foundation should have an easier method
> of enabling people to give donations.
> At the same time, I feel there is a (friendly) disagreement between us on
> how such money should be u
On Thu, Sep 16, 2010 at 8:50 AM, Michael Green
wrote:
> Dear readers,
>
> The problem is simple: I have weekly time series data with a maximum
> week number of (52,53,52,52) in (2008,2009,2010,2011) respectively. That
> means I have a dataset looking like this:
>
> 2008-01 value
> 2008-02 value
>
Hello,
This is a question motivated by curiosity, not a pressing problem. Any
responses are much appreciated! In the following code, function reg1 calls
glm with a formula object while reg2 uses a string. In both cases, glm
works; however, in the second case, the add1 function fails with the
fo
Enjoyed it very much!
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Tal Galili
Sent: Thursday, September 16, 2010 5:31 PM
To: jaropis
Cc: r-h...@stat.math.ethz.ch; lig...@statistik.tu-dortmund.de;
da...@revolutionanalytics.com
Subj
I see Joshua has kindly offered some resources to turn you from your
path of erroR and sins against the interpreteR, but if you want to do
extra penance, you might consider reading the R-FAQ (although your
issue if if and "&&" is surprisingly not included there) :
http://cran.r-project.org/
Thanks a lot. This helps a lot.
Toros
On Thu, Sep 16, 2010 at 4:29 PM, Ravi Varadhan wrote:
> Beware that you are likely to have multiple, or even infinitely many, roots
> in the complex plane. In the first example, there are infinitely many
> roots, which are equal to +/- 1i * (N * pi), where
George -
I think you're looking for the ifelse function:
X = c(100,125,110,90)
Y = c(200,110,150,200)
Z = c(125,105,130,75)
AA = c(150,140,200,65)
result = ifelse(X < Z & Y > Z,AA - Z,NA)
result
[1] 25 NA 70 NA
result[!is.na(result)]
[1] 25 70
(I'm assuming you said 50 when you meant 70.)
On 16/09/2010 5:00 PM, Rolf Turner wrote:
On 17/09/2010, at 8:51 AM, Duke wrote:
Hi Duncan,
On 9/16/10 3:47 PM, Duncan Murdoch wrote:
On 16/09/2010 3:40 PM, Duke wrote:
Hi all,
I am writing a function (fun.R), but I dont know how to code the
function so that the Help Text will be shown u
Hello George,
Two things should help you move from one case to multiple. First, if
is designed for a single result (TRUE or FALSE), but you actually want
many, so you can use the ifelse() function. Second, since you want to
examine each element, you just want '&', not '&&'. I believe this
does
> I know from organizing a conference in Germany that the only really good way
> was and is ordinary money transfer via BIC and IBAN numbers. Unfortunately,
> this system is pretty unknown in the US. Europeans can easily use money
> transfer to the R foundation.
>
Paypal?
Many open source projec
Hello,
I wrote this code which works fine on a single observation:
x<-100
y<-200
z<-125
aa<-150
if(xz) {aa-z}
result: 25
I am trying to apply this logic where x,y,z,and aa are arrays but with very
little success. I have tried using loops and whiles but I always get errors
of various types. I h
Hello dear Jaroslaw,
I strongly agree with you that the R foundation should have an easier method
of enabling people to give donations.
At the same time, I feel there is a (friendly) disagreement between us on
how such money should be used.
Your massage has inspired me to write a post on the topic
I write about R every weekday at the Revolutions blog:
http://blog.revolutionanalytics.com
and every month I post a summary of articles from the previous month
of particular interest to readers of r-help.
In case you missed them, here are some articles related to R from the
month of August:
http
Hi,
I have a quick question regarding the merits of modeling data using a
multivariate linear model versus a univariate linear model with an
interaction term. Here's the data set. Say I have gene expression from two
tissues liver and kidney and I'm interested in identifying differentially
expresse
On Thu, Sep 16, 2010 at 12:45 PM, Duncan Murdoch
wrote:
>
> On 16/09/2010 3:29 PM, Kevin Wright wrote:
>>
>> Revolution has given back in a number of ways: supporting the useR
>> conference, assisting R core with getting R to build on 64-bit Windows
>> systems, bug fixes, releasing some open sour
>
setClass("person",representation(age="numeric",weight="numeric"),prototype(age=NULL,weight=NULL))
[1] "person"
> bob <- new("person",age=30)
Error in validObject(.Object) :
invalid class "person" object: invalid object for slot "weight" in class
"person": got class "NULL", should be or extend
Is this a Windows system behind a firewall?
Can you reach the CRAN mirrors directly from Internet Explorer?
If yes to both, then you need to use
setInternet2(TRUE)
before doing the package installations from the RConsole menu.
See the Windows FAQ and the ?setInternet2 for more details.
On Thu,
On 17/09/2010, at 8:51 AM, Duke wrote:
> Hi Duncan,
>
> On 9/16/10 3:47 PM, Duncan Murdoch wrote:
>> On 16/09/2010 3:40 PM, Duke wrote:
>>> Hi all,
>>>
>>> I am writing a function (fun.R), but I dont know how to code the
>>> function so that the Help Text will be shown up when one types ?fun
Perhaps the following will be instructive:
mymat = matrix(1:6,3,2)
p = 1
mymat[p]
[1] 1
mymat[p,]
[1] 1 4
When you index a matrix by a single subscript, it returns a
single element, corresponding to the columnwise vector representation
of the matrix. I'm guessing you want to put the estimat
On Sep 16, 2010, at 4:43 PM, David Winsemius wrote:
On Sep 16, 2010, at 12:14 PM, smm7aa wrote:
Help!
I am unsure if I can analyze data from the following experiment.
Fish were placed in a tank at (t=0)
Measurements of Carbon Dioxide were taken each day for 120 days
(t=0,...120)
A few f
Hi Duncan,
On 9/16/10 3:47 PM, Duncan Murdoch wrote:
On 16/09/2010 3:40 PM, Duke wrote:
Hi all,
I am writing a function (fun.R), but I dont know how to code the
function so that the Help Text will be shown up when one types ?fun (of
course, after he loads it up). Anyone has any advice for
Hi,
I write below code for simulation for weibull- estimating parameters by
weibullMLE function,
Although I define metrix for the variables still I got this message: number of
items to replace is not a multiple of replacement length
Any suggestion
> est=matrix (NA, 2,2)
> se=matrix (NA, 2,2)
>
On Sep 16, 2010, at 12:14 PM, smm7aa wrote:
Help!
I am unsure if I can analyze data from the following experiment.
Fish were placed in a tank at (t=0)
Measurements of Carbon Dioxide were taken each day for 120 days
(t=0,...120)
A few fish were then randomly pulled out of the tank at differ
I am saving several plots to different formats. I want to be able to change
the font size for all of them at once. Is there a way to do this without
having to have a call to par every time a new device is opened? I know that
the par settings are removed after each device is closed.
Thanks for you
Hi,
Is there a function in R that's equivalent of nlinfit in Matlab? I'd like to
find parameters in a pre-determined form: x(t) ~ sum(beta1/beta2^i*x(t-i))
where i = 1,2,3n (n could be large)
Thanks,
Yingmei
The information contained in this message and its attach...{{dropped:10}}
_
Dear Jim,
Just to follow up some of the great suggestions with some examples:
#
# Initialize a list, length 4
lstuff <- vector(mode = "list", length = 4)
# store the results of your for loop in it
for (i in 1:4) {
lstuff[[i]] <- 3 + i
}
# The assign() w
Beware that you are likely to have multiple, or even infinitely many, roots
in the complex plane. In the first example, there are infinitely many
roots, which are equal to +/- 1i * (N * pi), where N = 1, 3, 5, ...
Similarly, there are infinitely many roots in my second example.
Therefore, I wou
Hi Toros,
It is actually quite easy to do this with existing real-root finders. If
you want to solve for F(z) = 0, where z = x + iy, you simultaneously solve
for the zeros of the real and imaginary part of F.
Here are a couple of examples using the package "BB":
fn1 <- function(x, a){
z <- x[
Set the inner margins to be small (the distance you want between the 2 plots),
then set the outer margin big enough to hold the x axis on the bottom plot.
Details on setting the margins is in ?par in case you don't know or remember
them.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
On 16/09/2010 3:40 PM, Duke wrote:
Hi all,
I am writing a function (fun.R), but I dont know how to code the
function so that the Help Text will be shown up when one types ?fun (of
course, after he loads it up). Anyone has any advice for me how to do that?
The help text is separate from t
This is FAQ 7.21.
Note that the most important part of the FAQ is the last few lines where it
essentially says "DON'T DO THIS". If this is just a model for a bigger
situation then definitely Don't Do This, as using assign and global variables
will just create more and bigger future headaches.
On 16/09/2010 3:29 PM, Kevin Wright wrote:
I am sure there would be enough to employ some foundation members
> full-time, pay external CSs and even protect the system in court from those
> who make money off of somebody else's work and do not give back to the
> community (you know who I am
Hi all,
I am writing a function (fun.R), but I dont know how to code the
function so that the Help Text will be shown up when one types ?fun (of
course, after he loads it up). Anyone has any advice for me how to do that?
Thanks,
D.
__
R-help@r-pr
On 09/16/2010 04:42 PM, Ben Bolker wrote:
> Jorge Nieves moorecap.com> writes:
>
>>
>>
>> Hi,
>>
>> We have some tight controls in our systems and I am having difficulty
>> downloading/upgrading R packages. The IT department will configure our
>> system to let me download packages from two or th
I am sure there would be enough to employ some foundation members
> full-time, pay external CSs and even protect the system in court from those
> who make money off of somebody else's work and do not give back to the
> community (you know who I am talking about).
>
If you are trying to smear Rev
On 09/16/2010 04:27 PM, slakov wrote:
>
> I hope to revive this topic. I have the same error message when I try to
> install any package.
Well, sorry to hear that, but perhaps you'll have better luck if you
supply the specifics. You seem to be replying to an ancient post on a
mailing list and you
Hi:
You already have some good solutions; here is another using the plyr
package, based on a slight modification in salary from Phil Spector's test
data:
sdata = data.frame(company=sample(LETTERS[1:8],1000,replace=TRUE),
person=1:1000,
salary= trunc(rnorm(100
The updated package has been submitted to CRAN and will propagate to mirrors
over the next day or so.
It is maintained on R-Forge at http://r-forge.r-project.org/projects/writexls,
where downloads will eventually be available as well.
Package: WriteXLS
Version: 2.0.1
Description: Cross-platf
ifelse return a value with the same length that logical test.
You need if () {} else {}
if (y == 5) rep(2, 4) else NA
On Thu, Sep 16, 2010 at 3:58 PM, deven hamilton wrote:
> I have come across simple problem in R and I was hoping
>
> someone out there could help me out. Here is the problem: I
I have come across simple problem in R and I was hoping
someone out there could help me out. Here is the problem: I am trying to
set up and rep statement with a conditional statement using ifelse. Here is
simple example.
> y=5
> o<-ifelse(y==5,rep(2,4),NA)
> o
> [1] 2
>
> If I check
Tianchan Niu isis.georgetown.edu> writes:
>
> Dear All,
>
> I was using rk4 and lsoda to solve a ODE system. However, both of them gave
> bad accurate solutions, especially compared with Matlab solver ODE45. For
> example, ODE45 gave solutions that can go to a stable level (about 1.6) when
> ti
On Thursday 16 September 2010, David Winsemius wrote:
> On Sep 16, 2010, at 1:11 PM, Dylan Beaudette wrote:
> > Hi,
> >
> > I have been trying to use the new .parallel argument with the most
> > recent
> > version of plyr [1] to speed up some tasks. I can run the example in
> > the NEWS
> > file [1
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Tan, Richard
> Sent: Thursday, September 16, 2010 8:39 AM
> To: r-help@r-project.org
> Subject: [R] get top n rows group by a column from a dataframe
>
> Hi, is there an R functi
Thanks, it works.
Richard
From: Henrique Dallazuanna [mailto:www...@gmail.com]
Sent: Thursday, September 16, 2010 1:56 PM
To: Tan, Richard
Cc: RICHARD M. HEIBERGER; r-help@r-project.org
Subject: Re: [R] get top n rows group by a column from a dataframe
You can try this:
(Using Richar
Yes, this was a little bug that will be fixed in the next release.
Hadley
On Thu, Sep 16, 2010 at 1:11 PM, Dylan Beaudette
wrote:
> Hi,
>
> I have been trying to use the new .parallel argument with the most recent
> version of plyr [1] to speed up some tasks. I can run the example in the NEWS
> f
Currently comments (#) are ignored by txtStart and friends due to the task
callback mechanism used. The txtComment function is available as a work around
to insert comments into the output/commands.
I tried running date() as below and everything worked as expected (the comments
were missing, b
You can try this:
(Using Richard's example):
aggregate(sdata['salary'], sdata[c('company')], function(x)tail(sort(x), 5))
On Thu, Sep 16, 2010 at 2:26 PM, Tan, Richard wrote:
> Hi Richard
>
>
>
> Thanks for the suggestion, but I want top 5 salary for each company, not
> the whole list. I don't
Hi:
On Thu, Sep 16, 2010 at 8:55 AM, Peter Holck wrote:
> Apologies, but after a fair amount of digging, I still only have a foggy
> understanding of the cause of this problem, due to my own ignorance.
>
> I hope to use RODBC package to connect to an Access DB when running 64 bit
> Win7 (R versi
Thanks guys. I forgot to use the argument "zlim". It's solved.
2010/9/16 Jim Lemon
> On 09/16/2010 12:05 PM, rusers.sh wrote:
>
>> Hi all,
>> I want to put several figures in a one figure for easy comparison, so i
>> need to use the same methods to plot these figures. The following is an
>> ex
Richard -
Is this what you're looking for?
sdata = data.frame(company=sample(LETTERS[1:8],1000,replace=TRUE),
person=1:1000,
salary=rnorm(1000))
splitsdata = split(sdata,sdata$company)
res = do.call(rbind,sapply(splitsdata,simplify=FALSE,
On 09/15/2010 12:03 PM, darckeen wrote:
>
> Class("person",representation(age="numeric",weight="numeric"))
> [1] "person"
>> bob <- new("person",age=30)
>> is.null(b...@weight)
> [1] FALSE
>> b...@weight
> numeric(0)
>> b...@weight == numeric(0)
> logical(0)
Hi darckeen -- use the prototype argum
On Sep 16, 2010, at 1:14 PM, fugelpitch wrote:
I have a file that reads like this:
How much R do you know? Are you still at the stage where you need
basic help reading a file into a session?
Species,Year,Julian_day
Alnus_glutinosa, 1873, 123
Sorbus_aucuparia, 1873, 122
(more specie
Hi Richard
Thanks for the suggestion, but I want top 5 salary for each company, not
the whole list. I don't see how your way can work?
Thanks,
Richard
From: RICHARD M. HEIBERGER [mailto:r...@temple.edu]
Sent: Thursday, September 16, 2010 11:53 AM
To: Tan, Richard
Cc: r-help@r-proje
Something like this?
library(ggplot2)
qplot(Year, Julian_day, data=a, colour=Species)
On Thu, Sep 16, 2010 at 12:14 PM, fugelpitch wrote:
>
> I have a file that reads like this:
>
> Species,Year,Julian_day
> Alnus_glutinosa, 1873, 123
> Sorbus_aucuparia, 1873, 122
> (more species...)
> Alnu
I have a file that reads like this:
Species,Year,Julian_day
Alnus_glutinosa, 1873, 123
Sorbus_aucuparia, 1873, 122
(more species...)
Alnus_glutinosa, 1874, 134
Sorbus_aucuparia, 1874, 143
(more species and years)
Is there a way to plot this as julian day over years so that each species
g
Hi,
I have been trying to use the new .parallel argument with the most recent
version of plyr [1] to speed up some tasks. I can run the example in the NEWS
file [1], and it seems to be working correctly. However, R will only use a
single core when I try to apply this same approach with ddply().
Thanks for all the suggestions, guys. It looks like TIFF may be the easiest
solution, as I wouldn't have to worry about printing to a postscript printer
or converting to PDF (when using EPS). That way, I could send the Word file
as is to all coauthors (important for collaboration - i.e., track c
Hello, I am trying to create a panel with the attached data frame. using the
following code:
> PanelRio = DataRiopaila[which(duplicated(DataRiopaila$SEC_STE)==T),]
> PanelRio=plm.data(PanelRio,index=c("SEC_STE","FechaSiembra"))
series
Pluv3Meses,PluvMes4al10,Pluv2UltimosMeses,Rad3Meses,RadMes4al1
Hi all,
We know old.packages() can check for updates of add-on packages, but
is there a way to check updates of R itself? "go to R homepage" is a
way, of course, but I hope this can be done by R.
I'm not sure about the "reliable" place to check; here is a simple
example to check from one of the C
Apologies, but after a fair amount of digging, I still only have a foggy
understanding of the cause of this problem, due to my own ignorance.
I hope to use RODBC package to connect to an Access DB when running 64 bit
Win7 (R version 2.11.1, 64 bit). I have successfully done this before on a
winXP
Hi:
Could you please devise a reproducible example that illustrates the problem?
As far as points (1) and (2) are concerned, if you lack row or column names,
they can always be defined and added to the object.
Dennis
On Thu, Sep 16, 2010 at 4:26 AM, Natasha Asar wrote:
> Thanks for the help
>
>
Help!
I am unsure if I can analyze data from the following experiment.
Fish were placed in a tank at (t=0)
Measurements of Carbon Dioxide were taken each day for 120 days (t=0,...120)
A few fish were then randomly pulled out of the tank at different days,
killed and examined for the presence of
1 - 100 of 185 matches
Mail list logo