Displaying 20 results from an estimated 1100 matches similar to: "place values into a matrix efficiently?"
2011 Dec 13
2
axis tick colors: only one value allowed?
Hi,
So far as I can tell, the 'col.ticks' parameter for axis() only uses the
first value provided. E.g.:
plot(0:1,0:1, col.ticks=c('blue','red','green')) #all ticks are blue
Just wondering if there's a different option in the basic plot commands
that can handle multiple colors, and also whether ggplot and/or lattice
allow for multiple tick colors.
2011 Dec 01
1
strange row numbering after rbind-ing a list
"Not that it really matters, but"
Can someone explain how the row numbers get assigned in the following
sequence? It looks like something funky happens when rbind() coerces
'bar' into a dataframe.
In either sequence of rbind below, once you get past the first two rows,
the row numbers count normally.
Rgames> (foo<-data.frame(x=5,y=4,r=3))
x y r
1 5 4 3
Rgames>
2011 Dec 13
1
Re : Polygon
HI,
Sorry Carl, I received your message in my spam folder. Sarah proposed me a good example of code.
Thank you
Momadou
________________________________
De : Carl Witthoft [via R] <ml-node+s789695n4188375h96@n4.nabble.com>
Envoyé le : Mardi 13 Décembre 2011 3h34
Objet : Re: Polygon
Please read the posting guide and provide a (small) reproducible example
of your data.
The statement
2013 Mar 01
1
.Call interface: Use R SEXP as C mutable *char
Dear R Developers,
DISCLAIMER: I am new to package development in R and new to this list.
I am trying to do something along the lines of:
SEXP test_fun (SEXP filename) {
const char *inputfile = translateChar(STRING_ELT(filename, 0));
int abc = some_function(inputfile);
...
}
The code compiles fine, but I get a warning:
"passing argument of 'some_function' discards qualifiers
2010 Oct 01
3
scoping goes wrong when some functions are used within others.
Dear,
I'm following the r tag on stackoverflow.com, and couldn't but notice
there are quite some questions popping up that deal with scoping in
relation to custom functions. I grinded my teeth on it already, and I
have absolutely no clue what goes wrong. The general pattern is as
follows :
ff <- function(x){
y <- some_value
some_function(y)
}
> ff(x)
Error in eval(expr,
2008 Apr 16
1
efficiently replacing values in a matrix
Hello all,
I should probably know this by now... Anyway:
I have a large matrix (dim(data) is 3000 18000). In each element are
one of the following character strings "0/0", "1/1", "1/2", "2/2". I
wanted to replace "0/0" with NA and the other three with 0,1,2
respectively. To accomplish just the first of these four steps I did
this:
2008 May 29
1
Separator argument in read.table
Hi,
Suppose I have the following tabular data:
1729_at | TRADD | TNFRSF1A-associated via death domain | protein-coding
1773_at | FNTB | farnesyltransferase, CAAX box, beta | protein-coding
177_at | PLD1 | phospholipase D1, phosphatidylcholine-specific | protein-coding
What is the right separator used for read.table function?
I tried this:
dat <-
2016 Sep 12
1
Counterintuitive use of LLVMBool in C-API?
Of course, this is normal for C-APIs. But maybe change the name to
LLVMResult to propagate the real use? I am not arguing about the results
themself. They are standard. But the name is missguiding. As long as it's
consistent i know that i have to write an extra record operator in Delphi
to reflect this.
2016-09-12 11:11 GMT+02:00 David Chisnall <David.Chisnall at cl.cam.ac.uk>:
> On
2010 Jul 28
1
How to point a column of dataframe by a "character"
Hello,
Here is a dilemma I am having for a long time. But, I couldn't figure it
out.
I have an vector of Y and a data frame named "data",which contains all Xs. I
tried to be more efficient in fitting a simple linear regression with each
X.
Firstly,
for (i in 1:(dim(data)[2])){
model<-lm(Y~data[,i])
# this is not what I want since the name of coefficient will be data[,i]
# I
2012 Jan 27
0
[LLVMdev] [RFC] Module Flags Metadata
On Jan 24, 2012, at 9:11 PM, Nick Lewycky wrote:
> Yeah, I can't think of any use for something that would pull out NamedMDNodes for no reason. That said, if you want this to work, please audit the module cloner at the very least (it should copy the NamedMDNodes).
>
> But what would you do with llvm-extract?
llvm-extract already copies over named metadata.
> Should it keep a
2012 Jan 09
6
runif with condition
Hi
I want to generate 4 random number which sum up to 100 always
Please help
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/runif-with-condition-tp4278704p4278704.html
Sent from the R help mailing list archive at Nabble.com.
2012 Sep 25
0
[libopusfile PATCH] build: implement autotools build system for libopusfile. (v3)
This time it's complete with assertions on make debug, proper
./configure switches for the optional features, visibility and warning
flags, and summary at the end of the configuration.
Signed-off-by: Diego Elio Petten? <flameeyes at flameeyes.eu>
---
.gitignore | 29 +++++
Makefile.am | 24 +++++
autogen.sh | 3 +
configure.ac | 66 ++++++++++++
2012 Sep 25
3
[libopusfile PATCH] build: implement autotools build system for libopusfile. (v2)
This time it's complete with assertions on make debug, proper
./configure switches for the optional features, visibility and warning
flags, and summary at the end of the configuration.
Signed-off-by: Diego Elio Petten? <flameeyes at flameeyes.eu>
---
.gitignore | 29 +++++
Makefile.am | 24 +++++
configure.ac | 66 ++++++++++++
m4/attributes.m4 | 321
2002 Apr 04
1
PR#1132.
Just now I again had occasion to want nested describe lists in a
documentation file. I found that the bug which I reported on 18
October, 2001 still persists. I checked on the bug report at the R
web page, and found that the notes say ``Not a problem in R 1.4.0
(2001-12-08)''.
Well, it's still a problem for me --- using R 1.4.1.
(Details:
platform sparc-sun-solaris2.7
arch
2012 Sep 29
2
[libopusfile PATCH] build: implement autotools build system for libopusfile. (v4)
Includes
- A make debug target that disables optimizations and enables
assertions,
- Proper ./configure switches for the optional features,
- A configuration summary,
- libtool versioning information,
- Visibility and warning flags,
- API documentation, and
- Support for out-of-tree builds.
Signed-off-by: Diego Elio Petten? <flameeyes at flameeyes.eu>
---
.gitignore | 29 +++++
2010 Mar 23
2
Saving tab/csv delimited data with NaN's
Hello,
I am working multiple simulated data sets with missing values, I would
like to store these data sets in either tab delimited format for .csv
format with missing values marked as NaN's instead of NA's.
I read the import/export document which mentions that write.table
command converts NaN's to NA. Is there any other way I can store the
NaN's. I tried the write syntax
2012 Nov 08
3
problem with package development and older defs earlier in search order
Hi,
I have a problem with a package I have developed in that functions do not get loaded due to older versions of the functions being in the .GlobalEnv? fetched from .Rdata files stored from previous saved workspaces. I need to be able to fix this somehow when I load the package. I do not want to mess up the search order to fix the problem.
How I got myself into this mess is that I started
2009 Nov 01
5
Headache with sessions being shared.
I have a really horrendous problem with sessions.
before_filter :find_cart_from_session
private
def find_cart_from_session
if session[:cart] # if there''s is a cart in the session
begin
@cart = Cart.find(session[:cart]) # return existing or new cart
rescue ActiveRecord::RecordNotFound
@cart = Cart.create
@cart.save
session[:cart] = @cart.id
2004 Jul 30
1
Three-way ANOVA?
Hi,
I'm a biologist, so please forgive me if my question sounds absurd! I have 3
parameters x1, x2, x3 and a response variable y.The sample size is 75. I tried
to do the following:
mylm<-lm(y~ x1 + x2 + x3, data="mydata")
but i can only get stats from anova for the first 2 variables. The third comes
up as NA. The degrees of freedom for the third variable are 0.
Is there
2016 Sep 12
2
Counterintuitive use of LLVMBool in C-API?
Hi,
I stumbled across the following:
> /* Builds a module from the bitcode in the specified memory buffer,
> returning a
> reference to the module via the OutModule parameter. Returns 0 on success.
> */
> LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf,
> LLVMModuleRef *OutModule);
However in most scenarios i know, a Bool is something like
0 = False
!0 = True
In short: