similar to: How to copy data from data.frame to matrix

Displaying 20 results from an estimated 800 matches similar to: "How to copy data from data.frame to matrix"

2011 May 18
1
How to make array of regression objects
Dear all, I have made couple logistic regressions, what making a distribution of some event. Currently, i store it like this: o1 <- lrm(...) o2 <- lrm(...) o3 <- lrm(...) ... Then, i have made a function to peak required regression object from this variables by it number: get_object <- function(obj_name, nModel) { eval (parse(text=paste("o <- ", obj_name, nModel,
2010 Jun 29
2
Matrix operations
Hello I have a quick question. I need to compute matrix in R, like A <- t(X) %*% solve(V) %*% X, where X is a vector and V is a matrix This code works, but now i want to optimize it. I have try: A <- crossprod(X, solve(V)) %*% X Is there another, better way? WBR Dima [[alternative HTML version deleted]]
2010 Sep 28
1
How to convert SEXP to double
Hello All, A simple question. I get some return from the R in my C++ program (via Rcpp package). The result come, as SEXP and it should be a simple numeric variable. How to convert it to double? The code, what i use: stringstream ss; ss << "p <- predict(fit_ar11, n.ahead = 2, doplot=FALSE);" << "p$pred[1]"; SEXP ans; int iRet =
2010 Apr 27
2
How to work out 3-way probabilities
Hello. I have a quick question. I try to use logit regression, to work out probabilities in the sport event. I have work out probabilities for group of 2 players: p1 - probability, what player1 will beat player2 p2 - probability, what player2 will beat player1 pt - tie probability, p1 <- 1 - p1 - p2; Now i want to work out probabilities for group of 3 players, like: pg1 - probability, what
2011 May 07
2
MDAC problems after last Wine path
Hello all. I'm using Fedora 14. I have patched my wine yesterday using yum, ane my wine current version is: 1.3.18-1.fc14. After that, some of my programs stop to working. It seems, what something happen with MDAC component, because program can't open mdb file and can not found MDAC component from the console. The errors. what i get: err:ole:CoGetClassObject class
2017 Sep 13
2
compounding precipitation based on whether falls within a day
Using the small reproducible example below, I'm wondering how best to complete the following task: In the small reproducible example below, the 3D array prec has indexes that correspond to time, x, y (i.e., prec[time, x, y]). In this case, the time index is hours since some predefined start time. I'd like to add up all the time indexes in 'prec' based on whether or not the
2008 Jan 25
2
form formatting
If I want to use fbml elements and rails tags, is there a way to do within a fb:editor? if I do: <% facebook_form_for(:task, at task,:url => create_task_path) do |f| %> Assign Task To: <%= fb_friend_selector %> <%=f.text_field :ttype, :label=> "Title"%> <%=text_field_tag :newrnumdays, ndays, :label => "# Days"%>
2017 Sep 13
0
compounding precipitation based on whether falls within a day
Thanks for the reprex. Wouldn't have bothered without it. The following is I believe **almost** what you want. It seems a bit clumsy to me, so others may provide you something neater. But anyway... ## Convert POSIXct vector to dates ## There are 22 different days, not 21 date <- as.Date(prec_idx) ## Sum results by date at each i,j of the last 2 array dimensions z <-
2012 Oct 11
1
Problems with getURL (RCurl) to obtain list files of an ftp directory
Dear all, I have a problem with the command 'getURL' from the RCurl package, which I have been using to obtain a ftp directory list from the MOD16 (ET, DSI) products, and then to download them. (part of the script by Tomislav Hengl, spatial-analyst). Instead of the list of files (from ftp), I am getting the complete html code. Anyone knows why this might happen? This are the steps i
2013 Mar 14
3
Error: did not find expected key while parsing a block mapping
I run test: test:units lass ProductTest < ActiveSupport::TestCase test "product attributes not be empty" do product = Product.new assert product.invalid? assert product.errors[:title].any? assert product.errors[:description].any? assert product.errors[:price].any? assert product.errors[:image_url].any? end test "price musst be
2004 Sep 29
5
Warning: number of items to replace is not a multiple of replacement length
What does this warning mean precisely? Is there any reason to care about it? Can I Avoid it by another way of programming? Thank you in advance.
2003 Nov 06
2
Number of Days
Hi everyone, I have been trying to compute numbers of days between two dates as follows: > x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960") > z <- format(x, "%d%b%Y") > ex <- c("1jan1961", "15jan1960", "21mar1975", "10jul1981") > ez <- format(ex, "%d%b%Y") > ez-z
2009 Mar 19
1
subtract values
Dear R-help I am using R version 2.6.2. I am trying to subtract specific values from a larger data frame. I feel this should be straightforward, but I am struggling. I have a dataframe "Bk" as follows: DateTime cumPrecip 01/01/2008 00:00 348 01/01/2008 01:00 348 01/01/2008 02:00 348 01/01/2008 03:00 347 01/01/2008 04:00 348 01/01/2008 05:00 348 01/01/2008 06:00 349
2005 Dec 19
3
given a mid-month date, get the month-end date
I have a vector of dates. I wish to find the month end date for each. Any suggestions? e.g. For 12/15/05, I want 12/31/05, For 10/15/1995, I want 10/31/1995, etc __________________________________________________ [[alternative HTML version deleted]]
2017 Sep 07
2
Samba Recycle Age limit.
Carlos A. P. Cunha via samba wrote: > For me, is "magic line" > > find $DEST -depth -mtime +$DAYS -print -delete ---- I'm guessing you probably want 'ctime' there. If you use mtime, then it will be deleted "ndays" after the last modification date on the file -- NOT the time the file was moved into the recycle bin. If you use ctime - that
2004 Apr 14
1
Feature proposal and implementation plan: --delete-delay
Hi folks, One feature I've wanted in rsync is the ability to delete files that no longer exist in the source *after some specified grace period.* The functionality I'm looking for is a backup system that won't actually delete files until a week or two after the user does. This would: 1. Protect against accidental file deletions; the user would have some time to realize the
2013 Mar 09
2
Default image_tag folder
Hey, guys. In documentation i read: "By default, files are loaded from public/images". I add for example <%= image_tag "logo.gif" %> When i check html code in browser i see next: <img alt="Logo" src="/assets/public/images/logo.gif">. Why folder assets? The default should have been <img alt="Logo"
2008 Sep 16
1
Samba LDAP entries for Password Change
Hi all, I have a question regarding the enforced change of passwords in Samba 3.0.28 (coming with Ubuntu Hardy) in connection with a LDAP backend. In particular, I am looking for a documentation how the fields sambaMinPwdAge, sambaMaxPwdAge (from sambaDomain), sambaPwdCanChange and sambaPwdMustChange (from sambaSAMAccount) interact. I would like to have the following: - when a new
2017 Sep 04
4
Samba Recycle Age limit.
Dear , My current samba versiion is samba-4.4.4 and running on centos 7.2 My current samba have recycle enable . I want to age limit for recycle bin . Please kindly let me know any parameter for recycle bin age limit . Best Regards, Si Thu.
2013 Apr 12
1
What is the meaning of the method to_param?
Hey! Foe example i have next code: test "should update user" do put :update, id: @user.to_param, user: @input_attributes assert_redirected_to users_path end What return id: @user.to_param? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group