On Thu, Jul 25, 2013 at 9:30 AM, Richard M. Heiberger wrote:
> On Vista with Powerpoint 2007, file2.eps crashes powerpoint,
> Once file.eps displayed, several times it crashed powerpoint.
>
> My task is now to see if ghostscript can read a pdf or ps or eps and
> convert it to png at res=300.
> Do
Disclaimer: I haven't seen your tif file and I know nothing about
readTiff... but here go some general comments.
TIF files can use different bit depths (number of bits to store each
pixel (or each color for each pixel). Most common software outputs 8-
or 16-bits, but your file probably has a highe
I am not an expert on shrinkage estimators of partial correlations
(such as the one in corpcor), but my sense is that it is difficult to
provide a good estimate of a p-value. You could try to email the
authors of the package and ask them, but this may be more of a
statistics rather than R question.
One more question about avoiding copies when modifying lists. I would
like to call a function (call it 'f') that does an operation on a
large array according to a given index. For example
f = function(data, index) sum(data[index])
The idea is to repeatedly call f() with the same 'data' but differ
:41 PM, Duncan Murdoch wrote:
> On 13-01-03 7:01 PM, Peter Langfelder wrote:
>>
>> Hello all,
>>
>> I am running into a problem with garbage collection not being able to
>> free up all memory. Unfortunately I am unable to provide a minimal
>> self-contained
On Thu, Jan 17, 2013 at 4:57 AM, vaseem shaikh wrote:
>
> But still, i am also trying to install the package by locally giving
> absolute path with repos= Null and type = "Source", will CRAN have any role
> to play here???
To compile a package on Windows, you need to install R tools (Rtools)
tha
Do your lines start with the hash mark #? If so, they are considered
comment. Set comment.char="" in your call to read.csv. Another
frequent culprit (personal experience) are apostrophes ('). If you
have any in your file, use the argument quote = "\"" or, if you are
sure the data are not quoted, us
On Thu, Jan 31, 2013 at 3:55 PM, Rich Shepard wrote:
> I don't see what's missing in my statements to add rows to a data frame
> and someone else will probably see what needs to be added to the statements.
>
> The data frame has this structure (without any data):
>
> $ PHYLUM : chr
> $
On Tue, Feb 26, 2013 at 8:34 AM, Joanna Papakonstantinou
wrote:
> So I realized I had to convert my dd.daisy to a matrix and used:
> ddmatrix.daisy<-as.matrix(dd.daisy)
> and then I passed that in as the distM:
>> cutreeDynamic(as.hclust(dd.diana), cutHeight = NULL, minClusterSize = 2,
> method =
On Wed, Mar 6, 2013 at 4:18 PM, Yao He wrote:
> Dear all:
>
> I have a big data file of 6 columns and 6 rows like that:
>
> AA AC AA AA ...AT
> CC CC CT CT...TC
> ..
> .
>
> I want to transpose it and the output is a new like that
> A
On Wed, Apr 17, 2013 at 10:36 AM, R. Michael Weylandt
>
> It sounds like you want .Deprecate
>
> ?.Deprecate
>
Perhaps you meant Deprecated?
?Deprecated
Best,
Peter
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PL
On Mon, Apr 22, 2013 at 1:15 PM, Barbour, Russell
wrote:
> I am having a problem with loading R on my 64 bit computer. It used to
> load perfectly until I upgraded to R 3.0.0 now it takes about 10 to even
> 20 minutes ? Does anyone know how to remedy this problem?
Did R-3.0.0 ever loa
Bert is correct that this is a statistics questions, but I'll throw in
my 2 cents anyway. The CMH test is formulated for count data and makes
certain assumptions on the distribution of the observed values. Since
you don't have count data (your data are not integer), chances are
that the assumptions
On Tue, Sep 18, 2012 at 5:35 PM, David Winsemius wrote:
>
> On Sep 18, 2012, at 5:10 PM, John Sorkin wrote:
>
>> Window 7
>> R 2.15
>>
>> I am writing a simulation which generates sample sized estimates from
>> simulated data. When I run the function shown below,
>> power.t.test(delta=14.02528,sd
Enclose the file name tmax.final.text in quotes. Otherwise R is
looking for a variable named tmax.final.text, not the file name named
"tmax.final.text".
HTH
Peter
On Thu, Sep 20, 2012 at 1:02 PM, gfishel wrote:
> Thanks for your help! Unfortunately, I am now getting this:
>
>> pdf(file="boxplot
Erin,
you seem to confuse R and C syntax a bit, among other things. See below.
On Mon, Sep 24, 2012 at 3:03 PM, Erin Hodgess wrote:
> Dear R People:
>
> I'm working on a project that will pass a matrix from an R function to
> a C subroutine.
>
> I tried to write the following:
>
> #include
> #in
Well, if I read the error message right, your image is too large. I
think you should explore alternate formats - does the journal accept
figures in a vector format such PS, EPS or PDF? Such figures will be
much easier to handle than a humongous tiff with file size of 60+
megabytes.
HTH,
Peter
run
capabilities(what="cledit")
in your R terminal session. If you get FALSE, your R was compiled
without command line editing support which you need for the "up arrow"
action.
Peter
On Mon, Oct 8, 2012 at 8:04 PM, Tjun Kiat Teo wrote:
> I am using R on Fedora 17 and the up arrow is not the pr
On Tue, Oct 9, 2012 at 4:37 PM, eliza botto wrote:
>
> Dear useRs,
>
> i am using NbClust to determine appropriate number of cluster for
> hclustering. i am consistently getting the following error
>
> Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed
> 65536") :
> missin
Hi Eliza,
this is not __reproducible__ code - how am I supposed to know what's
wrong when I don't have the input files you use? Please read the help
for NbClust carefully and check that all your input variables have the
correct dimensions. Some of the input seems strange, for example the z
matrix
arning to use R, so please forgive me if there is an
> obvious explanation for the following problem. My goal is to perform WGCNA
> on a dataset of 19776 genes, so I opted to follow the block-wise network
> construction (Section 2c) in the WGCNA R Tutorial by Peter Langfelder and
> Steve
It seems you don't quite understand how foreach works. foreach (..)
%dopar% { ... } takes the last value from each of the second {...}
evaluations and feeds them to the .combine function (in your case
rbind()). Since your last call in the %dopar% {...} block is assign(),
you are not getting anythin
On Wed, Apr 9, 2014 at 11:27 AM, Cassiano dos Santos wrote:
> I am testing a call to a C function from R, using .C interface. The test
> consists in passing a numeric vector to the C function with no entries,
> dynamically allocates n positions, makes attributions and return the vector
> to R.
Wh
On Fri, Apr 25, 2014 at 6:35 PM, chris Jhon wrote:
> Hi,
>
> I am using hclust and cutree to cluster a data frame y and cut it into few
> clusters as follows
>
> y
> V1 V2 V3 V4
> A 1 2 3 4
> B 5 6 7 8
> C 9 10 11 12
> D 13 14 15 16
> E 17 18 19 20
>> clu<-hclust(dist(y),method="comple
Make sure you have cairo-devel installed, and remove the lines
export CAIRO_LIBS=${HOME}/usr/local/lib
export CAIRO_CFLAGS=${HOME}/usr/local/include
from your .bashrc file. If you have cairo-devel installed normally,
the headers should be found with default settings of all search paths.
The setti
VE_SYS_WAIT_H 1
> | #define HAVE_SYS_TYPES_H 1
> | #define HAVE_SYS_STAT_H 1
> | #define HAVE_STDLIB_H 1
> | #define HAVE_STRING_H 1
> | #define HAVE_MEMORY_H 1
> | #define HAVE_STRINGS_H 1
> | #define HAVE_INTTYPES_H 1
> | #define HAVE_STDINT_H 1
> | #define HAVE_UNISTD_H 1
You are using the wrong algorithm. You want Partitioning around
Medoids (PAM, function pam), not k-means. PAM is also known as
k-medoids, which is where the confusion may come from.
use
library(cluster)
cl = pam(dis, 4)
and see if you get what you want.
HTH,
Peter
On Mon, Apr 28, 2014 at 9
WGCNA maintainer here. When working with a large data set, you have a
few options.
1. Without being snarky, the best option is to get (or get access to)
a computer with large-enough RAM. Many universities, departments, and
other research institutes have computer clusters with nodes with at
least 6
Hi Pan,
On Wed, May 14, 2014 at 9:14 PM, Panos Bolan wrote:
> Dear list,
>
> Apologies for posting this to both Bioconductor and here. I recently read a
> Bioconductor post where the developer of the WGCNA suggested the use of the
> package for RNA-seq data analysis after implementing a variance
Not sure if this is better than your "brute force" and you may be able
to simplify it...
notStart = function(x)
{
n = length(x)
i0 = which(x);
n0 = length(i0);
i0!=c(1:n)[1:n0];
}
notStartNorEnd = function(x) { which(x)[notStart(x) & rev(notStart(rev(x)))] }
notStartNorEnd(c(F, F, F))
##
On Tue, Jul 1, 2014 at 1:27 PM, Erin Hodgess wrote:
> Hello R People:
>
> I'm having a forest/trees location problem with the output of nls.
>
> If I save the output to an object, and print the object, it shows, amongst
> other things, the residual sum of squares. I would like to get that.
>
> Ho
Precision, precision, precision...
> z[2]-0.15
[1] 2.775558e-17
My solution:
> z <- signif(seq(.05,.85,by=.1), 5)
> z[2] - 0.15
[1] 0
> z[2]==0.15
[1] TRUE
Peter
On Thu, Jul 3, 2014 at 11:28 AM, Matthew Keller wrote:
> Hi all,
>
> A bit stumped here.
>
> z <- seq(.05,.85,by=.1)
> z==.05 #
Hi Johannes,
you mentioned dynamicTreeCut - the dynamic hybrid method works fine on
your data. Just supply the dissimilarity matrix as well: I use the
function plotDendroAndColors from WGCNA to show the results; if you
don't want to use WGCNA, just leave out the last call.
library(WGCNA)
set.see
On Thu, Nov 1, 2012 at 10:28 AM, Hermann Norpois
wrote:
> Hello,
>
> my data is sorted by start.ens (see below). And now I would like to extract
> all rows (so called* defined row*s) with type==Expression - subset (df,
> type==Expression) - and the aforegoing type==DNase HS (which is not
> necessa
On Thu, Nov 15, 2012 at 5:48 PM, Benjamin Ward (ENV) wrote:
> Hi,
>
> I have some values in a list format generated by the following:
> Path_Number <- 0010
> ID.Path <- formatC(0001:Path_Number, width=4, flag=0) # Make vector of ID's.
> No_of_Effectors <- sample(1:550, length(ID.Path), replace=TRU
On Wed, Nov 28, 2012 at 4:44 PM, Shi, Tao wrote:
> Hi list,
>
> I've encounter this problem (see below). I know it's particularly R-related
> and it's easy to get by but it still bothers me a lot.
>
>
> It looks the last character of "N.C. " is a space to me, but it's clearly
> not. Can someon
Not tested but should work:
sums = tapply(x, group, sum);
sums.ext = sums[ match(group, names(sums))]
normalized = x/sums.ext
It may be that the tapply is just as slow as your loop though, I'm not sure.
HTH,
Peter
On Thu, Nov 29, 2012 at 10:55 AM, Noah Silverman wrote:
> Hi,
>
> I have a ver
On Fri, Nov 30, 2012 at 9:47 AM, jaybell wrote:
> a=c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)
> b=c(0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1)
> cor(a,b)= -1
>
> a'=qbinom(a, 1, 0.5)
> b'=qbinom(b, 1, 0.5)
> why cor(a',b') becomes -0.5 ?
On my computer the correlation is -0.8. It is not 1
On Mon, Dec 3, 2012 at 3:30 PM, tdbuskirk wrote:
>
> Hello R Gurus,
>
> I am perplexed by the different results I obtained when I ran code like
> this:
> set.seed(100)
> test1<-randomForest(BinaryY~., data=Xvars, trees=51, mtry=5, seed=200)
> predict(test1, newdata=cbind(NewBinaryY, NewXs), type="
On Tue, Dec 4, 2012 at 11:27 AM, Charles Novaes de Santana
wrote:
> Dear Michael,
>
> Thank you for your answer.
>
> I have 2 matrices. Each position of the matrices is a weight. And I
> need to calculate the following sum of differences:
>
> Considering:
> mat1 and mat2 - two matrices (each of th
On Sat, Dec 28, 2013 at 7:27 PM, Andrew Hoerner wrote:
> Let us suppose that we have a function foo(X) which is called inside
> another function, bar(). Suppose, moreover, that the name "X" has been
> assigned a value when foo is called:
>
> X <- 2
> bar(X=X){
> foo(X)
> }
>
> I have noticed that
Here's a solution:
# This gives a vector of counts (if z is a data frame, first convert
it to a matrix)
res = sapply(as.vector(z), function(x) sum(w==x))
# This copies the dimensions of the variable 'z' to 'res':
dim(res) = dim(z)
Peter
On Thu, Jan 23, 2014 at 7:43 AM, wrote:
>Hi all,
> I
In short, use dplyr::summarize or plyr::summarize to select the one you want.
HTH,
Peter
On Wed, Jan 29, 2014 at 2:19 PM, Trevor Davies wrote:
> I think I have a hole in my understanding of how R uses packages (or at
> least how it gives functions in packages priority). I thought I would give
On Sat, Feb 15, 2014 at 8:43 AM, Lorenzo Isella
wrote:
> Dear All,
> I am a bit puzzled.
> I am developing a random forest model.
> The data is large and it involves hundred of predictors, but the code I have
> written is relatively simple.
> After training my random forest model, I apply it on so
Joshua,
I'm not sure I understand your aim correctly, but if I do, here's my
advice: If you are able to find the clusters according to rows or
columns using clustering, you must be using some kind of a distance
matrix that encodes whether two antibodies should be in one bin for
rows, and a similar
On Tue, Nov 5, 2013 at 3:36 PM, Uwe Ligges
wrote:
>
>
> On 06.11.2013 00:26, Simon Pickert wrote:
>>
>> Mcapply from package 'parallel'. Also see package 'multicore'
>
>
> Not mcapply: it won't work under Windows that the OP asked for.
>
> But package parallel is the right hint. It also provides o
On Mon, Dec 9, 2013 at 2:08 PM, Katharine Miller - NOAA Federal
wrote:
> Hello,
>
> I am having difficulty obtaining the correct colors in my R charts.
>
>> colors()[c(552, 254, 26)]
> [1] "red" "green" "blue"
>
> But, if I specify col=552 in my barplot, I get gray bars. Likewise,
> col=254 giv
On Tue, Dec 10, 2013 at 6:55 PM, bakerwl wrote:
> Expected values are needed to test a null hypothesis against observed
> counts, but if total observed counts are 20 for 3 categories, then a null
> hypothesis of a random effect would use expected values = 6.67 in each of
> the 3 categories (20/3)
On Thu, Dec 12, 2013 at 3:09 PM, capricy gao wrote:
> I could not figure out what was the default when I ran hclust() without
> specifying the method.
According to help("hclust"), the default method is complete linkage.
HTH,
Peter
__
R-help@r-projec
apply(test, 1, paste, collapse = ",")
On Tue, Jun 15, 2010 at 11:27 AM, Jonathan Greenberg
wrote:
> Folks:
>
> Say I have a matrix:
>
> test=matrix(c(1,2,3),nrow=10,ncol=3)
>
> I would like to have an output character vector where each line is
> row's values delimited by commas, e.g.:
>
> "1,2,3
eval(parse(text="print(9**2)"))
On Thu, Jun 17, 2010 at 12:32 PM, Johannes Huesing
wrote:
> Dear expRts,
> I have a character string, say a <- "print(9**2)". How do I execute
> the contents of the string, parsed as R code? Do I have to open a
> connection and use cat(a), and parse it at the other
package::function
On Mon, Jun 21, 2010 at 6:29 AM, Filoche wrote:
>
> Hi everyone.
>
> I want to use 2 different functions (in 2 packages) that have same name. for
> instance, if I call the function, it will use the one in the last called
> package. Is there a way to specify the package to use f
On Mon, Jun 21, 2010 at 4:18 PM, song song wrote:
> May I ask how to initialize a list?
>
> usually I will use " result=list(0) " to do this. is this right?
It works, but it is cleaner to use
results=list()
The difference is that list(0) will have one component that contains
the number zero, w
On Wed, Jun 23, 2010 at 10:01 AM, Lorenzo Isella
wrote:
> Dear All,
> I am using the plotrix library to plot some matrices.
> I have a problem: some of my data are outliers, hence using a linear
> color scale does not work very well (you would see too many cells having
> a similar, indistinguishab
On Thu, Jun 24, 2010 at 10:16 AM, Mike Williamson wrote:
> Hey everyone,
>
> I've been using 'R' long enough that I should have some idea of what the
> heck either expression() or eval() are really ever useful for. I come
> across another instance where I WISH they would be useful, but I c
On Thu, Jun 24, 2010 at 1:26 PM, Duncan Murdoch
wrote:
> On 24/06/2010 4:08 PM, Lasse Kliemann wrote:
>> What is the best way in R to compute a sum while avoiding cancellation
>> effects?
>>
>
> Use sum(). If it's not good enough, then do it in C, accumulating in
> extended precision (which is w
On Thu, Jun 24, 2010 at 1:50 PM, Duncan Murdoch
wrote:
> On 24/06/2010 4:39 PM, Peter Langfelder wrote:
>
>> AFAIK the optimal way of summing a large number of positive numbers is
>> to always add the two smallest numbers
>
> Isn't that what I said?
I understood t
On Thu, Jun 24, 2010 at 3:16 PM, john polo wrote:
> Dear R users,
>
> I have a list of numbers such as
>
>> n
> [1] 3000 4000 5000 3000 5000 6000 4000 5000 7000 5000 6000 7000
>
> and i'd like to set up a loop that will keep track of the number of
> occurences of each of the values that occur in t
Hi all,
I have a package that contains a function foo that calls a function
.fooInternal via match.fun('.fooInternal'). This step is necessary
because I want to give the user an option to override .fooInternal
with a custom function. The .fooInternal function name is not
exported. The function foo
2010/9/14 Uwe Ligges :
> I do not see any problem, we'd need to look at the package in order to help,
> I think.
I re-checked again and somehow the package now passes all checks, so I
must have mistyped something somewhere. Sorry for that.
Peter
__
R-h
Hello,
I encountered a weird problem. Consider the following code that takes
a list "lst" and shifts all elements one index up (for example, to
make space for a new first element):
lst = list(1,2)
ll = length(lst);
for (i in ll:1)
lst[[i+1]] = lst[[i]];
lst
If you run it, you get the expected
Hi Joshua,
thanks, I came up with that solution myself after a bit of thinking.
Normally I wouldn't worry about NULL components of lists, but dimnames
is a list and often some components are null and is therefore a bit
tricky to manipulate...
Peter
On Mon, Sep 20, 2010 at 7:39 PM, Joshua Wiley
On Tue, Sep 21, 2010 at 9:50 AM, qcshare wrote:
>
> Hello, everyone,
> When I run R, I met:
> "error:cannot allocate vector of size 400Mb", My data is large.
> What should I do?
> Thanks, everyone.
>
How big is the RAM in your computer?
There are a few things you can try:
1. Before running the
> this following code:
>
> x<-c(1,2,NA)
> length(x)
>
> returns 3, correctly counting numbers as well as NA's. How can I
> exclude NA's from this count?
>
sum(!is.na(x))
Peter
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
On Mon, Sep 27, 2010 at 8:22 AM, Kennedy wrote:
>
> Hi,
>
> I want to perform a hierarchical clustering using the median as linkage
> metric. As I understand it the function hcluster in package amap have this
> option but it does not produce the results that I expect.
>
> In the example below M is
On Mon, Sep 27, 2010 at 8:22 AM, Kennedy wrote:
>
> Hi,
>
> I want to perform a hierarchical clustering using the median as linkage
> metric. As I understand it the function hcluster in package amap have this
> option but it does not produce the results that I expect.
Also, if you have a large(r)
On Mon, Sep 27, 2010 at 8:48 AM, Justin Fincher wrote:
> Howdy,
> I have created a set of plots, but I wish to increase the dpi to 300
> (instead of the default 72). From the documentation, I thought that
> the "res" parameter to png should accomplish this, but it appears to
> greatly alter the
On Mon, Sep 27, 2010 at 9:34 AM, Jonas Josefsson
wrote:
> I have a two-column table as follows where age is in the 1st column and the
> number of individuals is in the 2nd.
>
> age;no
> 1;21
> 2;31
> 3;9
> 4;12
> 5;6
You can use the following trick:
x = rep(age, no)
This repeats age[1] no[1]-ti
On Tue, Sep 28, 2010 at 12:18 PM, Greg Snow wrote:
> Ctrl-C works on some platforms, it would help us to help you if we knew which
> OS you are using, which version of R you are using, and in some cases whether
> you are using the GUI or Terminal version of R.
>> Hi,
>>
>> I have an R function
On Tue, Sep 28, 2010 at 6:22 PM, Michael Larkin wrote:
> I am trying to get R to randomly select values from my dataset (i.e.
> bootstrapping) with replacement. However, my attempts at this have been
> unsuccessful. Here is a basic example of what I am doing:
>
> I have a data vector of 8 values
for (j in 1:n)
{
if (j%%2==0)
{
iRange = c(n:1)
} else
iRange = c(1:n)
for (i in iRange)
{
your code
}
}
Peter
On Wed, Sep 29, 2010 at 10:40 AM, cassie jones wrote:
> Dear All,
>
>
> I am trying to define a loop for a m*n matrix, where i=1:n and j=1:m. Un
On Wed, Sep 29, 2010 at 6:43 PM, Gundala Viswanath wrote:
> I have a vector that looks like this:
>
>> foo
> [1] "o" "o" "o" "x" "o" "o" "o" "o" "o" "x" "x" "o" "x
>
> How can we find the percentage of "o" and "x" in
> that vector in R?
table(foo)/length(foo)
Peter
On Wed, Sep 29, 2010 at 1:27 PM, Jyotasana Gulati wrote:
> Hi,
>
> I am have a data set of around 43000 probes(rows), and have to calculate
> correlation matrix. When I run cor function in R, its throwing an error
> message of RAM shortage which was obvious for such huge number of rows. I am
>
On Wed, Sep 29, 2010 at 7:18 PM, Christian Schoder
wrote:
> hi R-users!
>
> does anyone know how I can access/print only the first two digits of a
> number? if i have the number 23732, i would like to get 23. if i have
> 355 i would like to get 35. if i have 4 i would like to get 40.
It's a stran
ing differently across conditions.
>
> Has any one ever used this package--coXpress??
>
> Regards
> ..
> Jyotasana
> - Original Message -
> From: "Peter Langfelder"
> To: "Jyotasana Gulati"
> Cc: r-help@r-project.org
> Sent: Thursday, September
On Fri, Oct 1, 2010 at 10:51 AM, wrote:
> I calculated a large vector. Unfortunately, I have some measurement error
> in my data and some of the values in the vector are erroneous. I ended up
> wih some Infs and NaNs in the vector. I would like to filter out the Inf
> and NaN values and only k
Hi Mete,
I think you should look at the help for memory.limit. Try to set a
higher one, for example
memory.limit(16000)
(I think 16GB is what xenon will take).
Peter
On Fri, Oct 1, 2010 at 6:02 PM, Mete Civelek wrote:
> Hi Everyone,
>
> I am getting the following error message
>
> Error: cann
If no-one replies with a better way, here's a way: under
POSIX-compliant systems, you can write a small C function and wrap it
in an R function.
The C program would be something like
#include
void nProcessors(int & n)
{
#ifdef _SC_NPROCESSORS_ONLN
long nProcessorsOnline = sysconf(_SC_NPROCESSO
On Wed, Oct 6, 2010 at 9:32 AM, Ralf B wrote:
> Can one create a variable through a function by name
>
> createVariable <- function(name) {
> outputVariable = name
> name <- NULL
> }
>
> after calling
>
> createVariable("myVar")
>
> I would like to have a variable myVar initialized w
On Wed, Oct 6, 2010 at 9:32 AM, Ralf B wrote:
> Can one create a variable through a function by name
>
> createVariable <- function(name) {
> outputVariable = name
> name <- NULL
> }
>
> after calling
>
> createVariable("myVar")
>
> I would like to have a variable myVar initialized w
>
> #another simple function to update the value in a vector
> update<-function(index){
> test[index]<- 20
> }
> update(2)
> test
> #The update() function silently fails to accomplish the update
Replace the '<-' by '<<-' and you'll be good to go if you call the
function from a global environment.
you should close files that you do not use anymore. the maximum number
of open files is likely 4000 or so. Use close(file) before you open
the next one.
Peter
On Wed, Oct 6, 2010 at 4:55 PM, Yong Wang wrote:
> Dear List
> I am running a loop downloading web pages and save the html to a
> tempor
I think you want something like this:
optimal.nSplit = rep(NA, 50) # This will hold the result
for (run in 1:50)
{
fit1 = rpart(...)
cpTable = fit1$cptable
bestRow = which.min(cpTable[, "xerror"]);
optimal.nSplit[run] = cpTable[bestRow, "nsplit"]
}
In any case, look at
?rpart
?printcp
?r
>From what I read, you want something like this:
myfunction<-function(dataset,arg1,arg2)
{
func = match.fun(arg2)
argument = dataset[, match(paste(arg1,"_test", sep=""), names(dataset))]
result=func(argument)
return(result)
}
On Wed, Oct 13, 2010 at 9:28 AM, Manta wrote:
>
> Thaks for your q
On Wed, Oct 13, 2010 at 10:13 AM, Schwab,Wilhelm K
wrote:
> Hello all,
>
> I had a very strange looking problem that turned out to be due to unexpected
> (by me at least) format changes to one of my data files. We have a small lab
> study in which each run is represented by a row in a tab-delim
On Thu, Oct 14, 2010 at 5:21 PM, Paul Rigor (ucla) wrote:
> Hi all,
>
> I would like to use the fpc and cluster packages for clustering. However, I
> would like to create a custom dissimilarity object using a library in
> python. Has anyone attempted or know of a work-around for creating a
> diss
I assume you mean regression of x on y...
here's the code:
missing = is.na(x)
predicted = predict(lm(x~y))
x[missing] = predicted[missing];
Should work but please check.
Peter
On Thu, Oct 14, 2010 at 10:14 PM, Jumlong Vongprasert
wrote:
> Dear all
> I have data (x,y) with data x is missing i
On Mon, Oct 18, 2010 at 4:38 AM, John Haart wrote:
> Dear List,
>
> I have a table i have read into R:
>
> Name Yes/No
>
> John 0
> Frank 1
> Ann 0
> James 1
> Alex 1
>
> etc - 800 different times.
>
> What i want to do is shuffle yes/no and randomly re-assign them to the
On Thu, Oct 21, 2010 at 3:50 PM, HAKAN DEMIRTAS wrote:
> Hi,
>
> If a matrix is not positive definite, make.positive.definite() function in
> corpcor library finds the nearest positive definite matrix by the method
> proposed by Higham (1988).
>
> However, when I deal with correlation matrices w
On Tue, Oct 26, 2010 at 3:13 PM, Daisy Englert Duursma
wrote:
> There are several ways to do this but the package ggplot2
>
> library(ggplot2)
> qplot(displ,hwy,data=mpg,colour=factor(cyl))
>
>
That can of course be done also using the standard plot command
(substitute variable names as necessar
Sorry, this isn't really an R solution, but here it goes anyway. You
can isolate the block from Source to the first following blank line by
the following unix/linux/cygwin command, assuming inFile is your input
file and outFile is the output file:
cat inFile | grep -A 100 Source | grep -m 1 -B 100
Before plotting a heatmap we usually standardize all genes to mean
zero and variance 1. That way the green/red represent under/over
expression with respect to the mean expression, which is roughly what
the original 2-color arrays (that literally produced such heatmaps)
were measuring. Of course, st
You have (almost) exhausted the 10GB you limited R to (that's what the
memory.size() tells you). Increase memory.limit (if you have more RAM,
use memory.limit(15000) for 15GB etc), or remove large data objects
from you session. Use rm(object), the issue garbage collection gc().
Sometimes garbage co
for data to be swapped to and from the disk.
Peter
On Tue, Nov 2, 2010 at 7:36 PM, Peter Langfelder
wrote:
> You have (almost) exhausted the 10GB you limited R to (that's what the
> memory.size() tells you). Increase memory.limit (if you have more RAM,
> use memory.limit(15000) for
Just a shot in the dark... Do you properly close the input/output
files at the end of your function? If not and the file remains open,
it may throw an error upon new attempt to read it. It is possible that
dyn.unload, among other things, closes all open connections and hence
upon re-load everything
Weighted mean of x and y coordinates (sorry for the pun :)), that is
something like
n = 21
y = matrix( c(1:n), n, n)
x = matrix( c(1:n), n, n, byrow = TRUE)
# These are the Center of mass coordinates:
xCenter = sum(x * Z)/sum(Z);
yCenter = sum(y * Z)/sum(Z);
If you also need the z coordinate, it
On Mon, Nov 8, 2010 at 11:31 PM, Ab Hu wrote:
>
> Thanks! Works great.
> I have more questions on this, so I'll continue here:
>
> Now that I have the weighted mean, is it possible to reduce the size of
> mountain based on this weighted mean such the original matrix remains 21x21
> while the mount
On Tue, Nov 9, 2010 at 3:40 PM, Barry Rowlingson
wrote:
> On Mon, Nov 8, 2010 at 5:15 PM, Peter Langfelder
> wrote:
>
>> If you also need the z coordinate, it simply the mean of the matrix Z.
>>
>> zCenter = mean(Z)
>
> How can that be right? Suppose your moun
>> >> zCenter = mean(Z)
>> >
>> > How can that be right? Suppose your mountain is very flat, so that
>> > your mountain is effectively a cube. The Z values are all the same,
>> > and so their mean is the same. However the centre of mass is, by
>> > symmetry, clearly at height/2.
>> >
>> > Similar
> the exponent of asymmetric matrix makes me very curious.
> can anyone please explain to me "what will happen if we apply exponent to
> the asymmetric matrix"?
The gates of Hell will open, the world will come to an end, and we
will all perish in a firestorm :)
Sorry, couldn't resist. Exponentiat
101 - 200 of 413 matches
Mail list logo