similar to: New to R

Displaying 20 results from an estimated 2000 matches similar to: "New to R"

2011 Nov 17
3
Named rows in a table (data frame) read from a file
I read a table as follows: > F1 <- read.table("Rtext3.txt") > F1 Price Floor Area Rooms Age Cent.heat a 52.00 111 830 5 6.2 no b 54.75 128 710 5 7.5 no c 57.50 101 1000 5 4.2 no d 57.50 131 690 6 8.8 no e 59.75 93 900 5 1.9 yes As it is seen, the rows have a name. However I don't know how to access a
2007 Mar 06
3
Is there a quick way to count the number of times each element in a vector appears?
Hi there, I'm writing a function that calculates the probability of different outcomes of dice rolls (e.g., the sum of the highest three rolls of five six-sided dice). I'm using the "combinations" function from the "gtools" package, which is great: it gives me a matrix with all of the possible combinations (with repetitions allowed). Now I want to count the number
2008 Dec 31
1
Instalación de WinEdt para R
Buenas tardes a todos: Primero que nada un saludo y desearles un feliz 2009. Escribo para que me asesoren con la instalación de un editor de R, estube siguiendo los pasos de un manual 1. Instalar R 2. Instalar WinEdt 5 (V. 5.2 o superior) 3. Instalar *SWinRegistry *(disponible en http://www.omegahat.org/SWinRegistry): *Packages ! Install package(s) from local zip ¯les... * 4. Instalar
2009 May 21
4
Product of 1 - probabilities
I am having a slight problem with probabilities. To calculate the final probability of an event p(F), we can take the product of the chance that each independent event that makes p(F) will NOT occur. So... p(F) = 1- ( (1-p(A)) * (1-p(B)) * (1-p(C))...(1-p(x)) ) If the chance of an event within the product occurring remains the same, we can therefore raise this probability to a power of the
2007 Oct 08
5
Dice simulation: Getting rep to re-evaluate sample()?
I'm trying to get R to simulate the sum of the values on 10 fair dice (yes, it's related to a homework problem, but is not the problem itself). I tried to do this: > rep(sum(sample(1:6,100,replace=T)), times=10) [1] 341 341 341 341 341 341 341 341 341 341 and noticed that sum(sample()) seems to be only evaluated once. How can I overcome this, so that I get a vector of values that
2014 Jun 29
2
Winbind does not read uidNumber
Well, seems like I hit every mudhole that could be on the way ... root at samba4:/# getent passwd | grep mgr mgr:*:10000:10000:Lars LH. Hanke:/home/AD/mgr:/bin/bash root at samba4:/# ldapsearch -LLL -D "CN=Administrator,CN=Users,DC=ad,DC=microsult,DC=de" -x -W '(uid=mgr)' uid uidNumber gidNumber sAMAccountName name gecos Enter LDAP Password: dn: CN=Lars LH.
2011 Aug 30
3
Simulating distribution of max of two die
Hallo I am teaching a very elementary intro course about R, and want to show the students how to find the distribution of the maximum of rolling two balanced die. Is there perhaps a more elegant way to do this, other than the way I am using below? (I would like to show them two ways - the one shown here, and perhaps and improved/elegant approach (showing off the "beauty" of R.
2006 May 16
1
Size of observations
Hi All I had to assure the randomness of backgammon game's two dices. I took 8,000,000 observations and found that one of the dices is not uniform distributed. I took 80,000,000 observations and found that the dice is uniform distributed. In both tests I used Pearson Chi Square test. My questions: 1. How many observations should I take? 2. How much the 80,000,000
2006 Jul 19
1
Catch 22 with after_save. Please help.
I have a pretty strange problem. Here is basically what I have to demonstrate my problem: class Event < ActiveRecord::Base def after_create AnotherClass.find_event(id) end end class AnotherClass < ActiveRecord::Base def self.find_event(event_id) e = Event.find event_id end end Here is the catch 22 and it''s quite annoying. Basically ActiveRecord puts to whole save
2009 Dec 21
3
script
I want to have Asterisk Dial individual numbers and play a recording if each answers. If they don't answer then the code rolls to the next number. Should I set up a spreadsheet somewhere and load with the numbers? Or, an AGI script? 1. Dial number 1 2. If connect, then play message 3. If connect, finish message and move to next number 4. Dial 1 - 10,000 in succession
2007 Nov 08
3
'a' extension
Is there any way to see the called number when a call gets redirected to the 'a' extension from voicemail? Say x123 calls x456 and it rolls to voicemail. x123 hits * and gets dumped into the 'a' extension in the original context. I need some logic in 'a' to do a database lookup based on the original called number (x456). Any ideas? When I do a test, it appears
2010 Oct 08
6
Selección de observaciones
Hola a todos. Estoy atascado en un sitio que no me he encontrado antes, debe ser fácil y rápido, a ver si alguien me puede ayudar. Puesto fácil, tengo: > aa <- matrix(11:19,3,3) > aa [,1] [,2] [,3] [1,] 11 14 17 [2,] 12 15 18 [3,] 13 16 19 Quiero la fila cuyo primer elemento es 12 y el segundo 15. > aa[aa[,1:2] == (c(12,15)),] Error: (subscript) logical
2003 Nov 27
1
help me!
Would you help me to answer this question, please? /r/ is one of the most difficult English sounds to acquire and imitate. Describe in what ways it is different from our Spanish rolls (perro) and taps (pero). How does the pronunciation of this sound vary according to the context? Find at least three examples of linking r and intrusive r and transcribe into phonetics. When do we use them?
2003 Dec 26
2
fax detection: false positive
Hi guys, I just moved from Asterisk release 0.5.0 to CVS 2003-12-22, and after overcoming a few changes in my configuration, I encountered one problem that I couldn't shake that was working fine in 0.5.0. It's the fax detection. I just have a simple extension setup like this: exten => fax,1,Dial(Zap/4,30,tr) exten => fax,2,Hangup in my main incoming context. This used to
2009 Jan 14
2
List of Lists
Dear All; Is it possible to create a list of lists (I am sure it is) along these lines; I have a dataframe data02 that holds a lot of information, and the first column is ³date² I have a list of dates in; data03<-c(date1,.....,daten) And would like to create a list; data04 <- subset(data02, date == data03[1,]) Ie. data04 holds the data from data02 that matches a date in data03 How do
2006 Oct 30
2
Possible log rollover mutex problem
It appears that part of the problem could be that when logger rolls over the mongrel log file. There is a mutex synchronization issue where the various mongrel instances all try to write to the new log file and block each other. This keeps them in a continual Application 500 Error state. Has anyone run into this problem? With log rotation turned off the problem does not appear. - Jared Brown
2004 May 20
2
Fedora Core 2 and Kernel 2.6
Hi All, I decided to have a go at installing Asterisk on FC2 which now runs on Kernel 2.6.. Unfortunately I didn't get very far.. When trying to build zaptel it required me to link /usr/scr/linux-2.6 to the default source dir which is /usr/src/linux-2.6.5-1.358.. I guess thats still the RH infulence.. :) After than I tried again but the page rolls with errors and finally ends with..
2006 Jul 17
2
Very strange after_save problem. Please help.
I have a very strange problem here. I do not get this. So any help is greatly appreciated. Basically I have a model that calls a method in the background process in the "after_save" method. Let''s call the model products. So what happens is this: 1. I create a new product. 2. Everything works and the product is saved with id 13. 3. A method is called in my background
2024 May 18
2
Upgrade DC from 4.7 to 4.19
Hello, I have two Samba DCs currently on Ubuntu 18.04 LTS with Samba version 4.7 I would like to move to Ubuntu 24.04 LTS with Samba version 4.19. I don't want to do in place upgrade and iterate trough software versions I think there is to many changes. I thought I demote one DC give all FSMO rolls to the other do a clean install with the newer version then rejoin the domain keeping the
2006 Oct 31
2
corrupted index preventing save
Hi, I''m using Rails/AAF with Ferret 0.10.11, and my index occasionally (every few weeks, roughly) becomes corrupted. If the index is busted, until I rebuild it our users are unable to save anything. I get errors like the one below, and the save rolls back. My question is, is there any way to catch the error, and continue with the save even if the model isn''t indexed? What