Displaying 20 results from an estimated 8000 matches similar to: "distinguishing input objects for a function"
2013 Jan 07
2
plot x-axis DateTime NOT evenly spaced
R-64 latest
Hi. I am trying to plot a set of csv data, which looks like
> head(interval)
date inteval
1 2012-07-01 00:57:54 +0900 156
2 2012-07-01 01:07:41 +0900 587
3 2012-07-01 01:09:31 +0900 110
4 2012-07-01 01:18:42 +0900 551
5 2012-07-01 01:39:01 +0900 1219
6 2012-07-01 01:40:40 +0900 99
as you can see, more than one event happens each day,
2013 Mar 11
3
take two columns from a set of lists
say I have a matrix and lists like
x <- matrix(c(12.1, 3.44, 0.1, 3, 12, 33.1, 1.1, 23), nrow=2)
x.list <- lapply(seq_len(nrow(x)), function(i) x[i,])
if I want a column of the matrix x, I write
x[, 2]
for example.
But how can I do something similar for a set of lists, x.list, above?
> x.list
[[1]]
[1] 12.1 0.1 12.0 1.1
[[2]]
[1] 3.44 3.00 33.10 23.00
unlist(x.list)[,2] does
2013 Mar 18
4
plotting CIE chromaticity diagram?
Has anyone plotted or is it possible to plot
CIE *xy* chromaticity diagram
http://en.wikipedia.org/wiki/File:CIE1931xy_blank.svg
I need this plot in color.
ishida
[[alternative HTML version deleted]]
2013 Mar 10
2
list + lapply insead of matrix + apply
I need to develop a simple list manipulation. Although it seems easier to
do it in matrix form, but I need it in list form.
I have a matrix
x <- matrix(c(12.1, 3.44, 0.1, 3, 12, 33.1, 1.1, 23), nrow=2)
for list form example, the conversion is
x.list <- lapply(seq_len(nrow(x)), function(i) x[i,])
### list version
calcnorm=function(a, b){
diff <- mapply("-", a, b)
2011 Sep 06
1
repeatable segfault
Hi. macosx 10.6.8
With R-2.13.1 and also revision 56948 I get the following repeatable segfault:
wt118:~% R --vanilla --quiet
> R.Version()
$platform
[1] "x86_64-apple-darwin9.8.0"
$arch
[1] "x86_64"
$os
[1] "darwin9.8.0"
$system
[1] "x86_64, darwin9.8.0"
$status
[1] ""
$major
[1] "2"
$minor
[1] "13.1"
$year
[1]
2012 Feb 10
1
stepwise variable selection with multiple dependent variables
Good Day,
I fit a multivariate linear regression model with 3 dependent variables and several predictors using the lm function. I would like to use stepwise variable selection to produce a set of candidate models. However, when I pass the fitted lm object to step() I get the following error:
Error from R:
Error in drop1.mlm(fit, scope$drop, scale = scale, trace = trace, k = k, :
no
2012 Jan 27
4
Redirecting to create new page with input
Rails 3.1.3
I believe this is a very very fundamental question, but since I am new
to Rails, it''s more productive to ask someone to point out what I need
to do.
Say, I have a search method that generates a list of youtube videos. I
have completed this part.
And also, I have set up a database, Video, whose fields are video_title
and URL.
I need to place a button to each of these video
2012 Sep 10
2
suggestion for user-friendly input: typeahead
Rails 3.1.3
I am hoping some of you may give me suggestions about user input helper
methods.
I have a large set of model, Flight, and its fields are
airline, flight_name, departure, destination
As you can imagine, the flight data will be very large; it could be
thousands if it is international.
I will ask users to input the desired flight plan, and it will be
crucial if the users make
2013 Mar 08
1
reduce the size of list
hi. I have a list like
x <- list(1:10,11:20,21:30)
It's a sort of a 3 x 10 matrix in list form.
I would like to reduce the dimension of this list.
it would be something like
list(1:3, 11:13, 21,23)
I tried
x[,1:3]
does not work of course. Neither
lapply(x, [1:3])
works...
Any suggestions?
ishida
[[alternative HTML version deleted]]
2013 Mar 13
1
image color analysis
I am not sure if I should ask this question in this list. But I'll try.
Currently I am trying to analyze images using EBImage and biOps.
One of the features that I need to extract from various images is the color
spectrum, namely, which colors each image consists of.
So, each image hopefully can be converted into some sort of color histogram
so that color ingredients are easily comparable
2004 Aug 05
1
Using pipe for input data
Hi.
I have asked this question before and Aaron J. Mackey and Tony Plate gave me
some great insight but I still can't figure out how to do what I am trying
to accomplish. So let me ask again...
What I am trying to do is to make R read data from pipe (stdin).
Say I have following files on my directory
my.dat
apple 1
orange 2
grape 3
my.R
d <- read.table(
2011 Sep 01
4
readBin fails to read large files
Posting for a friend
Begin forwarded message:
From: "Geier, Florian" <florian.geier08@imperial.ac.uk<mailto:florian.geier08@imperial.ac.uk>>
Subject: Fwd: readBin fails to read large files
Date: September 1, 2011 4:10:53 PM GMT+01:00
To:
Begin forwarded message:
Date: 1 September 2011 16:01:45 GMT+01:00
Subject: readBin fails to read large files
Dear all,
I am trying
2012 Feb 24
3
Devise generates Mailer by its own?
Rails 3.1.3
Hi. I''m a little confused with Devise and ActionMailer.
It seems that Devise has its own way of sending mails through
ActionMailer.
Does it generate Mailer class when "rails g devise..." command is
executed?
Or do I need to do some special command in order to generate Mailer?
I have certainly set up a devise User table but there is no Mailer class
for it,
2004 Jul 21
3
Can R work on very large of data?
Hello..
I am pretty new for R, but if I understand it correctly, when R read data by
doing something like "d <- read.table("/dev/stdin")", it read entire data
first then start processing..
Is there anyway I can tweak R around so that it will start processing as
data comes and not load everthing on memory at once? The reason for this is
because we have a case where
2011 Oct 05
3
suppressing stderr output from system() calls
Dear list,
I'm trying to suppress/redirect/squash the output from commands like install.packages, or download.file. The problem is that none of: sink(..., type="message"), sink(..., type="output"), capture.output, suppressMessages are quite doing the trick. Output gets written to the stderr stream, despite any combination of the above suppression commands.
According to
2004 Jul 09
3
Can R read data from stdin?
Is there anyway I can write a script which feed input datasource from stdin
and let R process it (maybe frequency report) then output the report to
stdout?
I can't seem to find much info on documentation or FAQ on this topic.
Thanks!
Soichi Hayashi
**********************************************************************
The information contained in this communication is
confidential,
2013 Apr 27
4
required field for one, optional for another
rails 3.2.11
My app has User model, its one of the fields is entrepreneur:boolean.
So users have two types; one is normal users, the other is professional
users.
For normal users, only emails and usernames are required and other
fields are optional.
For professional users, in addition to above, addresses and real names
are required.
Is there any Ruby way to set the requirement depending on the
2012 Oct 13
4
Database design, working but looking for better ways
Rails 3.1.3
Hi. I have designed the database used for my travel plan application.
You should be able to look at the diagram in the link below, hopefully.
https://cacoo.com/diagrams/biDSyxh8yzk2kIeg
("belongs_to" is omitted since it''s obvious)
Basically, the application can list the destinations from a choice of
the departure.
Not mention that the departure_id (integer) and
2011 Aug 23
3
Bug or feature? sum(c(a, b, c)) != (a + b + c)
Greetings all,
I'm porting an algorithm from MATLAB to R, and noticed some minor
discrepancies in small decimal values using rowSums and colSums which
are exacerbated after heavy iteration and log space transformation.
This was rather perplexing as both programs claimed and appeared to use
the IEEE 754 standard for floating point arithmetic (confirmed with
manual basic operations).
2012 Feb 22
3
Parent id for find_or_create method
Rails 3.1.3
I have tables, Video and Script having association,
Video 1 --- n Script
So, every Script needs the parent id, in this case, video_id.
If I simply create a new Script instance, the view renders as follows.
<%= render :partial => "new_script", :locals => { :script =>
Script.new(:video_id => @video.id)} %>
which works fine. Now I would like to