Dear folks--
I always seem to find that I spend more than half my time making sure my
input date is in the right form, properly aligned, with no bizarre features.
You know the drill: five kinds of missing values, three of them documented.
An alpha mistype in one numeric field turns 30,000 numbers
Thanks, Josh! I'm using TINN-R now, but I have been thinking of switching to
ESS. Though perhaps TINN-R has a similar function -- I had been looking
for consol functions, rather than editor functions.
andrewH
--
View this message in context:
http://r.789695.n4.nabble.com/Searching-the-console-
Hi Andrew,
If you use http://ess.r-project.org/ just go to the R buffer and
type: C-s (CTRL + s) which will let you search through the console.
You can use C-M-s (CTRL + ALT + s) if you want to search using regular
expressions.
Cheers,
Josh
On Wed, Sep 7, 2011 at 10:03 PM, andrewH wrote:
> Is
Is there any way to search the console during an interactive session? I've
looked and looked, and can not find one. In some add-on package, maybe?
Sorry to be so basic, but help would be greatly appreciated.
andrewH
--
View this message in context:
http://r.789695.n4.nabble.com/Searching-the-c
On Wed, Sep 7, 2011 at 9:59 PM, Katrina Bennett wrote:
> I have a zooreg object and I want to be able to generate a value for seasons
> and 11-day composites paste it onto my zoo data frame, along with year,
> month and days.
>
> Right now I have the following to work from:
>
> eg. dat.zoo.mdy <-
hmm, frustrating. BTW, unique() works alright. It seems not using deparse()
or using it differently
On Wed, Sep 7, 2011 at 11:27 PM, William Dunlap wrote:
> I don't think you can increase width.cutoff above 500 and
>
> it isn't an argument to as.character or match. The best
>
> solutio
I don't think you can increase width.cutoff above 500 and
it isn't an argument to as.character or match. The best
solution would be to avoid the internal use of deparse
when using match() or unique() on lists and to hash the
list element directly, but that is a fair bit of work.
Bill Dunlap
Spotf
Correction. It won't work. Please ignore.
>>> John Sorkin 9/7/2011 10:41:46 PM >>>
Let my try again, but this time with corrected R code:
would the following strategy work:
numtests <- 2000
# Create a data frame: test1 results from trial 1
# test2 results from trial 2
#
I tried converting the elements to strings before, but due to the large data
size it took forever to finish with paste(). Is there anyway to set the
default width.cutoff longer and pass it to match()?
On Wed, Sep 7, 2011 at 10:42 PM, William Dunlap wrote:
> match(aList, aList) probably does wha
I populated my object just using as.list(myDataFrame). My problem is that
after doing this, all assignments of the other slot (index) become very
slow.
Thank you for your reply.
André Rosi
2011/9/7 William Dunlap
> You did not show the code you used to populate your
> object, but consider the
R can tell you how many possible answers there are with those givens though:
?Inf
Really though, you can get at some information if you are willing to set one
of those definitively. I.e. If you set sample size you can 'find' data which
match specs but isn't going to be applicable to anything
match(aList, aList) probably does what as.character(aList) does:
cut off the character strings at 500 characters (because deparse(x,
nlines=1, width.cutoff) requires that width.cutoff<=500) . Try
converting the elements to character strings yourself before passing them
to match. E.g.,
ac <- s
Let my try again, but this time with corrected R code:
would the following strategy work:
numtests <- 2000
# Create a data frame: test1 results from trial 1
# test2 results from trial 2
# agree indicagtor if trial1= trial2 (value =1) or
#
Thanks for benchmarking them. data.table is indeed worth looking at.
On Wed, Sep 7, 2011 at 9:55 PM, Dennis Murphy wrote:
> Hi:
>
> Here are a few informal timings on my machine with the following
> example. The data.table package is worth investigating, particularly
> in problems where its adva
Hi: I don't know if this is what you meant but here's a way to cheat and do it.
1) back out the [sigma over sqrt root of n] from the 95 % CI and call it X.
2) then generate data using rnorm(n*, known mean, sigma*)
where sigma*/sqrt(n*) = X is satisfied.
3) there will be many solutions to 2) so
Would the following strategy work?
numtests <- 20
# Create a data frame: test1 results from trial 1
# test2 results from trial 2
# agree indicagtor if trial1= trial2 (value =1) or
# trial1<>trial2 (value =0)
data <-
Now I nailed down the problem, but I am still confused why match() takes the
1st two components and the last two the same.
> match(a,a)
[1] 1 2 3 1 2
> a
[[1]]
[1] "YARCTy1-1" "YAR009C" "YBLWTy1-1" "YBL005W-B" "YBRWTy1-2" "YBR012W-B"
[7] "YDRCTy1-1" "YDR098C-B" "YDRCTy1-2" "YDR210C-D" "YDRCTy
On 08/09/11 09:51, Tyler Hicks wrote:
Is there a function in R that will generate data from a known mean and 95% CI?
I do not know the distribution or sample size of the original data.
No. R is wonderful, but it cannot work magic.
cheers,
Rolf Turner
___
Hi,
Here is a follow up, I resolve the problem in another way.
"
> e <- evaluate_Weka_classifier(p)
> print(subset)
> print(e$details[1])
> return(e$details[1])"
change this lines to
"
e <- sum(iris$Species == predict(p))/nrow(iris)
print(subset)
print(e)
return(e)
It works wel
I have a zooreg object and I want to be able to generate a value for seasons
and 11-day composites paste it onto my zoo data frame, along with year,
month and days.
Right now I have the following to work from:
eg. dat.zoo.mdy <- with(month.day.year(time(dat.zoo)), cbind(dat.zoo, year,
month, day,
Em 7/9/2011 16:53, array chip escreveu:
Hi all, thanks very much for sharing your thoughts. and sorry for my describing
the problem not clearly, my fault.
My data is paired, that is 2 different diagnostic tests were performed on the same
individuals. Each individual will have a test results fr
Hi:
Here are a few informal timings on my machine with the following
example. The data.table package is worth investigating, particularly
in problems where its advantages can scale with size.
library(data.table)
dt <- data.table(x = sample(1:50, 100, replace = TRUE),
y = sam
Thanks for the suggestion. I guess that's the only thing I could do
On Fri, Aug 26, 2011 at 4:22 AM, Petr PIKAL wrote:
> Hi
>
> >
> > Thanks, Jim. quote='' works. And then I found a single quote in each of
> > these lines:
> > 3262
> > 10403
> > 17544
> > 24685
> > 31826
> > 38967
> >
> > None o
Thanks for all your replies. I am using rowsum() and it looks efficient. I
hope I could do some benchmark sometime in near future and let people know.
Or is there any benchmark result available?
On Wed, Aug 31, 2011 at 12:58 PM, Bert Gunter wrote:
> Inline below:
>
> On Wed, Aug 31, 2011 at 9:50
Thanks, Bill. match() is nice and efficient. However, I met a problem:
My real data is a large _list_ named "read.genes". I found conflict results
between match() and unique() - the lengths of the outcomes are different
(and my final result are wrong too). I suspect that some different list
compon
Hi all,
Last post didn't give the plain format:
I was trying to combine RWeka and FSelector, and do the forward feature
selection with J48/C5.4 decision tree:
Here is the code:
#==
library(RWeka)
library(FSelector)
library(rpart)
On 08/09/11 12:05, William Dunlap wrote:
You did not show the code you used to populate your
object, but consider the following ways to make as.list(1:5)
via repeated assignments:
> system.time( { z0<- list() ; for(i in 1:5)z0[i]<- list(i) } )
user system elapsed
13.340.
You did not show the code you used to populate your
object, but consider the following ways to make as.list(1:5)
via repeated assignments:
> system.time( { z0 <- list() ; for(i in 1:5)z0[i] <- list(i) } )
user system elapsed
13.340.00 13.42
> system.time( { z1 <- list() ;
On Sep 7, 2011, at 6:31 PM, dadrivr wrote:
Here's an example:
id <-
c(17,17,17,18,18,18,19,19,19,20,20,20,21,21,21,22,22,22,23,23,23,24,
24,24,25,25,25,26,26,26)
age <- rep(c(30,36,42),10)
outcome <-
c(12,17,10,5,5,2,NA,NA,NA,8,6,5,11,13,10,15,11,15,13,NA,9,0,0,0,20,
14,1
Here's an example:
> id <- c(17,17,17,18,18,18,19,19,19,20,20,20,21,21,21,22,22,22,23,23,23,24,
> 24,24,25,25,25,26,26,26)
> age <- rep(c(30,36,42),10)
> outcome <-
> c(12,17,10,5,5,2,NA,NA,NA,8,6,5,11,13,10,15,11,15,13,NA,9,0,0,0,20,
> 14,16,1,2,2)
> mydata <- as.data.frame(c
Is there a function in R that will generate data from a known mean and 95% CI?
I do not know the distribution or sample size of the original data.
Cheers,
Tyler L Hicks
PhD Student
Washington State University - Vancouver
E-mail: tyler_hi...@wsu.edu
Website: www.thingswithwings.org
"Back of
I'm creating an object of a S4 class that has two slots: ListExamples, which
is a list, and idx, which is an integer (as the code below).
Then, I read a data.frame file with 1 (ten thousands) of lines and 10
columns, do some pre-processing and, basically, I store each line as an
element of a l
Hi All,
After fitting a model with glm function, I would like to do the model selection
and select some of the features and I am using the "step function" as follows:
glm.fit <- glm (Y ~ . , data = dat, family = binomial(link=logit)) AIC_fitted
= step(glm.fit, direction = "both")
I was wonderin
On Sep 7, 2011, at 6:07 PM, Dale Coons wrote:
Doing a visual graphic and trying to make it "pretty"
Here's simple chart to play with:
library(rgl)
dotframe<-
data.frame(x=c(0,7,0,0,-7,0),y=c(0,0,7,0,0,-7),z=c(7,0,0,-7,0,0))
dotframe plot3d(dotframe$x,dotframe$y,dotframe$z, radius=3,
type='
Hi:
For your test data, try this:
# Result of dput(NerveSurv)
NerveSurv <- structure(list(Time = c(0, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 0,
0.25, 0.5, 0.75, 1, 1.25, 1.5, 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5
), SAP = c(1, 1.04, 1.04, 1.06, 1.04, 1.22, 1.01, 1, 1.01, 1.01,
1.06, 1.01, 0.977, 0.959, 1, 1.0
I'm getting the impression from on-line docs that R cannot work with
single-precision floating-point numbers, but that it has a pseudo-mode for
single precision for communication with external programs.
I don't mind that R is using doubles internally, but what about storage?
If all I need to s
Doing a visual graphic and trying to make it "pretty"
Here's simple chart to play with:
library(rgl)
dotframe<-data.frame(x=c(0,7,0,0,-7,0),y=c(0,0,7,0,0,-7),z=c(7,0,0,-7,0,0))
dotframe plot3d(dotframe$x,dotframe$y,dotframe$z, radius=3,
type='s',col=c('red','green','blue','purple','orange','gra
Hi, Jesper:
Where "Outside R" do you want to use it?
There are R interfaces to many other software packages, and many
that cannot easily link to R can link to Fortran. You could use
library(sos) to search for R packages to connect to whatever.
Hope this helps.
Spe
Hi Jeff,
My question is not related with SQL.
I have all the data available in a csv file.
I am looking for R algorithm where can specify a time period and then R
essentially uses this time period as a sliding window for all the event-time
stamps and gives
a significant distribution of occ
On Wed, Sep 7, 2011 at 2:25 PM, Ross Maidment <
r.i.maidm...@pgr.reading.ac.uk> wrote:
> Hi,
>
> I am using the package ncdf to create netCDF files and I want to mimic the
> the header of an exiting netCDF file created outside of R. Below is what the
> existing header looks like (part of it that i
I think (no promises) roll.apply() from the zoo package with sum can count
occurrences in whatever time period. Then use a logical test to identify
sufficiently active periods.
Hope this helps,
Michael Weylandt
On Sep 7, 2011, at 4:07 PM, Vineet Shukla wrote:
> Hi,
>
> Premises: I have a d
Add geom_errorbar() before adding geom_point() ?
---
Jeff Newmiller The . . Go Live...
DCN: Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Em
On Sep 7, 2011, at 4:49 PM, dadrivr wrote:
David Winsemius wrote:
What "mean summary line"? I count 8 lines and that matches the number
if id's with complete data.
Yea, I don't know why there is no mean summary line showing up. I
requested
it in the interaction.plot statement (fun = mea
You could phrase this in most dialects of SQL, but you don't say what kind of
database you are using and this is not a SQL help list.
You could also look at the rollapply function in the zoo package.
---
Jeff Newmiller The ..
Hi all,
This seems like a basic problem, but no amount of playing with the code has
solved it. I have a time-series data set like that shown below (only longer)
and am seeking to plot the data with filled, circular points and error bars.
I would like the error bars to be behind the points otherwis
David Winsemius wrote:
> What "mean summary line"? I count 8 lines and that matches the number
> if id's with complete data.
Yea, I don't know why there is no mean summary line showing up. I requested
it in the interaction.plot statement (fun = mean), and I don't get any
errors. Any ideas?
-
Hi,
I am using the package ncdf to create netCDF files and I want to mimic the the
header of an exiting netCDF file created outside of R. Below is what the
existing header looks like (part of it that is different):
netcdf ccd1984_05_08 {
dimensions:
lat = 1974 ;
lon = 1894 ;
Hi,
Premises: I have a database which contain the list of events and their time
stamps (This is a Unix time stamps)
What I want to do : I want know how much is the maximum occurrence of this
in any a time period of 7 days or does a event occur es more than "N" (say
5) times in a period of 7 days
Thanks!
That's exactly it.
get gets it ;-)
Berry
From: michael.weyla...@gmail.com
Date: Wed, 7 Sep 2011 14:54:48 -0500
Subject: Re: [R] access objects
To: berryboessenk...@hotmail.com
CC: r-help@r-project.org
The get() function should get you where you need.
Michael Weylandt
On Wed, Sep 7
Hi Jean,
Thanks for the reply..
Using your suggestion, I end up in in the source code (Fortran 77 i
believe). At first look, it seems a bit more tedious to implement than I
expected.
--
View this message in context:
http://r.789695.n4.nabble.com/Application-of-results-from-smooth-spline-outsid
Hi all,
Although I sent the mail to Piotr, the author of FSelector, it should be better
to ask here to let others know.
Yanwei
Begin forwarded message:
From: Yanwei Song
Date: September 7, 2011 4:41:58 PM EDT
To: p.roman...@stud.elka.pw.edu.pl
Subject: FSelector and RWeka problem
Dear P
Hi all, thanks very much for sharing your thoughts. and sorry for my describing
the problem not clearly, my fault.
My data is paired, that is 2 different diagnostic tests were performed on the
same individuals. Each individual will have a test results from each of the 2
tests. Then in the end,
On Sep 7, 2011, at 20:57 , zugi young wrote:
> I have the following results for an ANOVA comparing two nested models. I
> wasn't sure how I am supposed to report this result in the area of
> psychology. Specifically, am I supposed to report the DF's or just the F
> ratio? I could manually calcula
On Sep 7, 2011, at 5:20 PM, Saptarshi Guha wrote:
Hello,
I would like to write a function where substitute operates on the
parameter, but ...
Expression = function(o,l) substitute(o, l)
Expression({x=.(FOO)}, list(FOO=2))
o
How do i get substitute to work on the contents of o.
I sugge
Hi:
Having just seen your follow-up question, here's how it could be done
in ggplot2 or lattice:
# ggplot2 version:
ggplot(w, aes(x = age, y = outcome)) + geom_line(aes(group = .id)) +
stat_summary(fun.y = 'mean', geom = 'line', color = 'blue', size = 2)
# lattice version:
xyplot(outcome ~ ag
I have used do.call("substitute", ...) to work around the
fact that substitute does not evaluate its first argument:
R> z <- quote(func(arg))
R> do.call("substitute", list(z, list(func=quote(myFunction),
arg=as.name("myArgument"
myFunction(myArgument)
S+'s substitute (following S versi
Hello,
I would like to write a function where substitute operates on the
parameter, but ...
> Expression = function(o,l) substitute(o, l)
> Expression({x=.(FOO)}, list(FOO=2))
o
How do i get substitute to work on the contents of o.
Regards
Saptarshi
_
fit1, the unrestricted model, includes 1 more regressor than fit2, the
restricted model. Testing the models against each other means that fit2 is
"equal to" fit1, assuming that the coefficient on the additional regressor
that is included in fit1 is restricted to zero.
Your F-test is thus whether t
Hi:
Your code doesn't work, but if you want to do spaghetti plots, they're
rather easy to do in ggplot2 or lattice.
The first problem you have is that one group in your test data has all
NA responses, so by() or any other groupwise summarization function is
going to choke unless you give it a way
On 07/09/2011 3:46 PM, Michael Grant wrote:
I wish to test the hypothesis of mu equal to or less than 5 against the
specific alternative mu equal to or greater than 7. I am unable to find how to
persuade R to do this with any function (e.g. t.test). Suggestions?
According to the standard hy
On Sep 7, 2011, at 3:46 PM, dadrivr wrote:
Here's an example:
/id <-
c(17,17,17,18,18,18,19,19,19,20,20,20,21,21,21,22,22,22,23,23,23,24,
24,24,25,25,25,26,26,26)
age <- rep(c(30,36,42),10)
outcome <-
c(12,17,10,5,5,2,NA,NA,NA,8,6,5,11,13,10,15,11,15,13,NA,9,0,0,0,20,
14,1
The get() function should get you where you need.
Michael Weylandt
On Wed, Sep 7, 2011 at 12:53 PM, Berry Boessenkool <
berryboessenk...@hotmail.com> wrote:
>
>
> hi,
>
> say I have consecutively numbered objects obj1, obj2, ... in my R
> workspace.
> I want to acces one of them inside a functio
Scott Bearer TNC.ORG> writes:
>
> Dear all,
>
> This relatively routine analysis has left me frustrated and in a rut. I
> have a dataset (data1), which I subset in order to remove rows where
> HabitatDensity="Med". This dataset looks correct when I call it up,
> however, when I create a table
Dear R-users,
I'm running a maximization problem in which I want to impose a condition on
the relationship between 2 parameters.
The condition is that w[4] = (1+eps)/(2*w[1]), or equivalently w[4]*w[1] =
(1+eps)/2 , where eps is some small positive constant.
I've been trying to formulate a functi
Here's an example:
/id <- c(17,17,17,18,18,18,19,19,19,20,20,20,21,21,21,22,22,22,23,23,23,24,
24,24,25,25,25,26,26,26)
age <- rep(c(30,36,42),10)
outcome <-
c(12,17,10,5,5,2,NA,NA,NA,8,6,5,11,13,10,15,11,15,13,NA,9,0,0,0,20,
14,16,1,2,2)
mydata <- as.data.frame(cbind(id,age,ou
Hello, I am attempting to train a random forest model using the
randomForest package on 500,000 rows and 8 columns (7 predictors, 1
response). The data set is the first block of data from the UCI
Machine Learning Repo dataset "Record Linkage Comparison Patterns"
with the slight modification that I
hi,
say I have consecutively numbered objects obj1, obj2, ... in my R workspace.
I want to acces one of them inside a function, with the number given as an
argument.
Where can I find help on how to do that? Somebody must have been trying to do
this before...
Some keywords to start a search ar
I wish to test the hypothesis of mu equal to or less than 5 against the
specific alternative mu equal to or greater than 7. I am unable to find how to
persuade R to do this with any function (e.g. t.test). Suggestions?
Michael Grant
[[alternative HTML version deleted]]
__
Sorry, I thought the link would work for people because it is a public link
and it works for me when I run it in R. Anyways, here is an example set of
data that I am having trouble with:
/id <-
c(230017,230017,230017,230018,230018,230018,230019,230019,230019,230020,230020,
230020,230021,2
Thank you. This is a nice trick, and it works fine for my needs.
It's surprising that there isn't a simple way to get to the drive name.
On Tue, Sep 6, 2011 at 10:41 PM, Joshua Wiley wrote:
> Hi,
>
> This comes with absolutely no guarantees (and a good recommendation to
> be cautious), but you
Dear all,
This relatively routine analysis has left me frustrated and in a rut. I
have a dataset (data1), which I subset in order to remove rows where
HabitatDensity="Med". This dataset looks correct when I call it up,
however, when I create a table out of the new subset (data2), my table
contin
I am trying to create a classification tree using either tree or rpart
but when it comes to plotting the results the formatting I get is
different than what I see in all the tutorials. What I would like to
see is the XX/XX format but all I get is a weird decimal value. I was
also wondering how yo
Well that is really on the windows end, not the R end (which may not make it
any less surprising). I would not be surprised if there was an easier way
using .net or vbs which I get the sense is partly where some things are going
(e.g., with the so-called PowerShell), but I am not terribly fami
I have the following results for an ANOVA comparing two nested models. I
wasn't sure how I am supposed to report this result in the area of
psychology. Specifically, am I supposed to report the DF's or just the F
ratio? I could manually calculate the degrees of freedoms, but there must be
a reason
"However, it is not known whether the standard errors obtained from this
Hessian are asymptotically valid."
Let me rephrase this. I think that as a measure of dispersion, the standard
error obtained using the augmented Lagrangian algorithm is correct. However,
what is *not known* is the asymp
Yes, numDeriv::hessian is very accurate. So, I normally take the output from
the optimizer, *if it is a local optimum*, and then apply numDeriv::hessian to
it. I, then, compute the standard errors from it.
However, it is important to know that you have obtained a local optimum. In
fact, you
Hello,
I am wondering if it is possible, or what the correct way to code a three-way
crosstab in R using the survey package?
I have been using the following code to complete two way crosstabs, but have
not seen any three-way code.
Two-Way: svyby(~factor(a), ~factor(b), data, svymean)
Thanks!
Rac
To follow up (because I received a few emails off-list), things work now.
I'm not sure what I did differently. In case it is helpful:
I reinstalled R tools, and edited by path so that
C:\Rtools\bin;C:\Rtools\perl\bin;C:\Rtools\MinGW\bin;C:\Program
files\R\R-2.13.1\bin;C:\Program Files\HTML Help
. wrote:
>
> Hello guys,
>
> I would like to ask for help to understand what is going on in
> "func2". My plan is to generalize "func1", so that are expected same
> results in "func2" as in "func1". Executing "func1" returns...
>
> 0.25 with absolute error < 8.4e-05
>
> But for "func2" I get..
Under Vista and Windows 7, I install R in a local directory "pgms" so I
never have to worry about permissions.
Under Linux, I use "su" not "sudo". Then I call R and install.packages.
Then I quit R and "su" and continue with what I want.
hope this helps.
Spencer
On 9/7/2011 5:11 AM, Karl
Mikkel Grum yahoo.com> writes:
>
> I have a script that runs as a cron job every minute (on Ubuntu 10.10 and R
2.11.1), querying a database for new
> data. Most of the time it takes a few seconds to run, but once in while it
takes more than a minute and the next
> run starts (on the same data) b
On Sep 7, 2011, at 9:45 AM, dadrivr wrote:
Bump, please help!
When I encounter one of these Nabble "bump" messages doing my
moderation duties I simply discard it. This is not a website. This is
a mailing list.
If you didn't get an answer it suggests that your example was not
sufficie
The terminology (melt, cast, recast) just isn't intuitive to me; but I
understand how to use melt now.
Thanks!
Justin Haynes wrote:
>
> look at the melt function in reshape, specifically ?melt.data.frame
>
> require(reshape)
> Raw.melt<-melt(RawData,id.vars='Year',variable_name='Month')
>
>
On Sep 7, 2011, at 9:46 AM, dadrivr wrote:
Can anybody help me with this?
Your chances of a meaningful reply would increase considerably if you
first read the Posting Guide and also followed the other guidance seen
at the bottom of every rhelp posting.
--
View this message in context:
Varsha Agrawal wrote on 09/07/2011 05:18:10 AM:
>
> The code looks like this:
> L1=list(a=1,b=2,c=3)
> f1=as.factor(c)
> L1[[f1]] returns 1
>
> What happens if we give a factor as an index at a list?
>
L1=list(a=1,b=2,c=3)
f1=as.factor(L1$c)
L1[[f1]]
When you use a factor (e.g., f1, corrected
Hi,
On Wed, Sep 7, 2011 at 5:25 AM, Divyam wrote:
> Hi,
>
> I am new to R and here is what I am doing in it now. I am using machine
> learning technique (svm) to do predictive modeling. The data that I am using
> is one that is bound to grow perpetually. what I want to know is, say, I fed
> in a
On Sep 7, 2011, at 6:04 AM, Varsha Agrawal wrote:
The code looks like this:
L1=list(a=1,b=2,c=3)
f1=as.factor(c)
L1[[f1]] returns 1
What happens if we give a factor as an index at a list?
In a virgin session of R there would be no 'c' for the second line to
work with. And since 'c' is a fu
Indeed, the original post leaves some room for interpretation. In any case, I
hope the OP has enough information now to figure out what approach is best for
his data.
Best,
Wolfgang
> -Original Message-
> From: Bert Gunter [mailto:gunter.ber...@gene.com]
> Sent: Wednesday, September 07
Try this:
funa <- function(n, y, a, rate, samp) {
lambda <- a * n
dexp(n, rate) * do.call(paste("d", samp, sep=""), y, lambda)
}
funb <- function(y, a, rate, samp) {
integrate(f1, 0, Inf, y, a, rate)
}
funb(1, 0.1, 0.1, "pois")
Jean
>
> Hello guy
Is this meant to be a follow up to something?
In short, the answer to your question is how factors are encoded as integers
in R. If you run something similar to this code (except that actually runs)
you'll note that as.numeric(f1) = 1.
Michael
On Wed, Sep 7, 2011 at 5:04 AM, Varsha Agrawal wrote
look at the melt function in reshape, specifically ?melt.data.frame
require(reshape)
Raw.melt<-melt(RawData,id.vars='Year',variable_name='Month')
there is an additional feature in the melt function for handling na values.
names(Raw.melt)[3]<-'CO2'
> head(Raw.melt)
Year MonthCO2
1 1958
Hi,
I'm trying to reshape my data set from wide to tall format for multilevel
modeling. Unfortunately, the function I typically use (make.univ from the
multilevel package) does not appear to work with unbalanced data frames,
which is what I'm dealing with.
Below is an example of the columns of a
I have a script that runs as a cron job every minute (on Ubuntu 10.10 and R
2.11.1), querying a database for new data. Most of the time it takes a few
seconds to run, but once in while it takes more than a minute and the next run
starts (on the same data) before the previous one has finished. In
Can anybody help me with this?
--
View this message in context:
http://r.789695.n4.nabble.com/Change-properties-of-line-summary-in-interaction-plot-tp3788614p3796133.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
Bump, please help!
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-by-statement-for-spaghetti-plots-tp3788536p3796131.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https:/
Dear all,
I estimate Fixed-effects model. Since it use "within" transformation, it
also reports "within" SSR in summary report.
The problem is that I need overall SSR. How can I quickly compute it?
Thanks in advance!
Best wishes,
Igors
--
View this message in context:
http://r.789695.n4.n
Ben - I'm sorry, you're right! The following website shows how to make a
volcano plot using ggplot2.
http://bioinformatics.knowledgeblog.org/2011/06/21/volcano-plots-of-microarray-data/
Enjoy!
Anna
--
View this message in context:
http://r.789695.n4.nabble.com/r-help-volcano-plot-tp3792651p3795
Dear Arne,
I have sent you an e-mail to your e-mail at gmail.com. There I have attached
my data set and the code for this particular problem. I hope to hear from
you soon.
Many thanks in advance!
Igors
--
View this message in context:
http://r.789695.n4.nabble.com/function-censReg-in-panel-d
The code looks like this:
L1=list(a=1,b=2,c=3)
f1=as.factor(c)
L1[[f1]] returns 1
What happens if we give a factor as an index at a list?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/lis
The code looks like this:
L1=list(a=1,b=2,c=3)
f1=as.factor(c)
L1[[f1]] returns 1
What happens if we give a factor as an index at a list?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/lis
1 - 100 of 137 matches
Mail list logo