R

78

Solutions

5

Articles & Videos

205

Contributors

R is a programming language and environment used primarily for statistical data analysis.

Share tech news, updates, or what's on your mind.

Sign up to Post

I'm in the Business Intelligence Department, but practically speaking we're the Reporting Department, your basic operational type of reports - lists, lists, and more lists.

I'm at an institution of higher learning, and a new project has come up for the Math Department. They want to know relationships between courses, grades, etc.

Examples:

- if someone gets a D in Calc I, what's the likelihood of graduation?  with various permutations, like taking Calc I again
- what's the likelihood of someone getting a D in Calc I, getting a D or F in Calc II
- for placing incoming students in Pre-Calc or Calc I, what are the factors that indicate success? such as Verbal SAT

So I think I've targeted the right discipline (Analytics), but not sure where to take this project.
0
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I need some advice in writing below query: I used to have joins before in the below query. I am re-writing that query using CTE. But i am not getting expected results. Query is:

WITH PERS_ADDRESS
     AS (SELECT PERS_ID,
                ZIP_CODE_NUM,
                ROUTER_CALL_DAY_IDENTIF,
                ROUTER_CALL_IDENTIF,
                created_on,
                LANG_CODE
           FROM (  SELECT PA.PERS_ID,
                          ZIP_CODE_NUM,
                          CL.ROUTER_CALL_DAY_IDENTIF,
                          CL.ROUTER_CALL_IDENTIF,
                          cl.created_on,
                          CL.LANG_CODE,
                          ROW_NUMBER ()
                             OVER (PARTITION BY PA.PERS_ID ORDER BY END_DATE)
                             AS R
                     FROM call_log@ATLG03 CL
                          LEFT JOIN PERS_ADDR@ATLG03 PA
                             ON PA.PERS_ID = CL.PERS_ID
                          LEFT JOIN ADDR@ATLG03 AD ON AD.ID = PA.ADDR_ID
                    WHERE     PA.END_DATE > SYSDATE
                          AND (    CL.ROUTER_CALL_DAY_IDENTIF IS NOT NULL
                               AND CL.ROUTER_CALL_IDENTIF IS NOT NULL)
                          AND cl.created_on >=
                                 TO_DATE ('03/16/2017', 'mm/dd/yyyy')
                          AND cl.created_on <
                                 TO_DATE ('03/17/2017', 'mm/dd/yyyy') + 1
                          AND

Open in new window

0
Hi Do you know where I can install MS R MS SQL Server 2016?
I assume it is free. Am I right?
0
Hey its supposed to load pdf from a IRandomAcessStream;


but no work says "invalid parameter" on underlined and bold line;

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Storage;
using Windows.Data.Pdf;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace App73
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            button_Get.Tapped += Button_Get_Tapped;
        }

        private async void Button_Get_Tapped(object sender, TappedRoutedEventArgs e)
        {
            MemoryStream mem = new MemoryStream(File.ReadAllBytes(@filename.Text));

            Windows.Storage.Streams.IRandomAccessStream r = mem as Windows.Storage.Streams.IRandomAccessStream;

          [b]  PdfDocument dc = await PdfDocument.LoadFromStreamAsync(r);

[/b]
         

           

           
0
My procedure is passed a comma-separated list of IDs, for example 7369,7499,7839,7902. I tried to use it in my code like this:

declare
   p_empno_list constant varchar2(20) := '7369,7499,7839,7902';
begin
   for r in (
      select * from emp
      where  empno in (p_empno_list)
   )
   loop
      dbms_output.put_line(rpad(r.empno,9) || r.ename);
   end loop;
end;
/
but it just gives me an error:1 When SQL is expecting a character string such as SMITH, but is passed a comma-separated list such as SMITH,JONES,FORD,MILLER, no error is produced, but the query simply returns no rows.

ERROR at line 1:
ORA-01722: invalid number
ORA-06512: at line 4

How can i convert CSV to list so that it can be accepted in IN- clause?
0
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Storage;
using Windows.Data.Pdf;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace App73
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            button_Get.Tapped += Button_Get_Tapped;
        }

        private async void Button_Get_Tapped(object sender, TappedRoutedEventArgs e)
        {
            MemoryStream mem = new MemoryStream(File.ReadAllBytes(@filename.Text));

            Windows.Storage.Streams.IRandomAccessStream r = mem as Windows.Storage.Streams.IRandomAccessStream;

            PdfDocument dc = await PdfDocument.LoadFromStreamAsync(r);



         
           


        }
    }
}
it doesn't debug .don't know why???
0
Hello, needing some help here.

Cell Sheet5 B13 and C13 has values that represent temperature and dewpoint in Fahrenheit.  I need to convert each value into Celsius, the formala is 5/9*(Temp-32).  Then for the first value I need to use this formula 6.11*10.0**(7.5*Tc/(237.7+Tc)), where Tc is the value.  Then for the second value I need 6.11*10.0**(7.5*Tdc/(237.7+Tdc)), where Tdc is the second value.  Finally I need to divide the number from the second equation by the number in the first equation and times it by 100.

Finally, I need to computer =16.923+(Temp*1.85212*(10^-1))+(5.37941*RH)-((Temp*RH)*1.00254*(10^-1))+((Temp^2)*9.41695*(10^-3))+((RH^2)*7.28898*(10^-3))+((Temp^2)*RH*3.45372*(10^-4))-(Temp*(RH^2)*8.14971*(10^-4))+((RH^2)*(Temp^2)*1.02102*(10^-5))-((Temp^3)*3.8646*(10^-5))+((RH^3)*2.91583*(10^-5))+(RH*(Temp^3)*1.42721*(10^-6))+((RH^3)*Temp*1.97483*(10^-7))-((RH^2)*(Temp^3)*2.18429*(10^-8))+((RH^3)*(Temp^2)*8.43296*(10^-10))-((RH^3)*(Temp^3)*4.81975*(10^-11)).  Temperature is the original Fahrenheit value and RH is what we calculated above.


Trying to shoot for some type of function as I will need to use this to calculate multiple cells.  Thanks in advance for you help.
0
well it is supposed to be a map guide:

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Devices.Geolocation;
using Windows.Services.Maps;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace App50
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            _map.Tapped += _map_Tapped;
        }

        private void _map_Tapped(object sender, TappedRoutedEventArgs e)
        {
            BasicGeoposition b = new BasicGeoposition();

            b.Latitude = Convert.ToSingle(_latitude.Text);

            b.Longitude = Convert.ToSingle(_longitude.Text);

            Geopoint p = new Geopoint(b);

            MapLocationFinderResult r = MapLocationFinder.FindLocationsAtAsync(p).GetResults();

            foreach(var vari in r.Locations)
            {

                _result.Text = …
0
Hi,
I have a spreadsheet where a User keeps track of numbered Jobs.
The current Userform can be updated with more information as Jobs progress.

Is there any way to write back the data in a different font or colour ?
We want to use "strikeout" font on cancelled Jobs (rather than have a new field in the spreadsheet).
I will put a "cancelled Job" button on the Userform for this purpose (with all the appropriate controls).

Example of current code to write back data is:

r = worksheetfunction.match(Val(JobBox), Ws.columns(1), 0)
currentrow = r
Me.firstnamebox = ws.cells(r, "b")
Me.lastnamebox = ws.cells(r, "c")
Me.Phonebox = ws.cells(r, "d")
Me.AgeBox = ws.cells(r, "e")
....etc,etc

cheers (P.S. Have not done this forum stuff for a zillion years so a bit out of date )
0
So I'm trying to put together a website to display analytics that are output from R Studio.  I'd like to keep the same masterpage and basic site design that we have on our other company sites which are all ASP.Net...   Any ideas on how I can programmatically accomplish this, these reports will be generated daily.  I know this is a broad question but all of my searches have left me unsure how to accomplish this.  Deadlines Friday, so...  =D  Even a basic direction at this point would be greatly appreciated.  I basically want to have the HTML page hosted within my ASP Masterpage as if they were one page.  Any ideas?
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Guys,I am trying to get this piece of code working but I know its wrong but cant think how to fix it

What I want it to do is look at the cell in column D and compare the result of the formula which is a look up and if they match then to not colour the cell but if they don't then I want it to colour the cell.

Sub LoopFormula()

On Error GoTo myError

LastRow = Cells(Rows.Count, "A").End(xlUp).Row

For r = 3 To LastRow

If (Sheet2.Cells(r, "D")) = "=IF(D3=VLOOKUP(D3,Project!$A$2:$A$3000,1),VLOOKUP(D3,Project!$A$2:$A$3000,1))" Then Sheet2.Cells(r, "D").Interior.ColorIndex = xlNone
If (Sheet2.Cells(r, "D")) <> "=IF(D3=VLOOKUP(D3,Project!$A$2:$A$3000,1),VLOOKUP(D3,Project!$A$2:$A$3000,1))" Then Sheet2.Cells(r, "D").Interior.ColorIndex = 3

Next

Exit Sub
myError:

MsgBox ("Error"), , "Error"

End Sub


Any help
0
<?php
if( $_GET["shortcode"]) {
$api = file_get_contents("https://api.instagram.com/oembed/?url=http://instagram.com/p/"$_GET["shortcode"]"/");      
$apiObj = json_decode($api,true);      
$media_id = $apiObj['media_id'];
echo $_GET["shortcode"];
}

Open in new window


it not work . how can i call $_GET between URL
http://instagram.com/p/"$_GET["shortcode"]"/");

Open in new window

0
The program in the attached file is used by Account Managers to report chemical readings observed at a customer's location.  Some Account Managers may have 10 or more customer files to maintain.  I have developed a code module to support future releases of the program that systematically copies customer data from existing files into the newer version of the program.

In an effort to reduce screen flashes I created a Modeless Userform that informs the user of progress throughout the program update progress.  The issue I am having is that the Userform opens and displays correct information initially.  After a file is updated, the Userform is Unloaded and then the Show command is issued as the next file is being manipulated.  Although the Userform remains visible on the screen, it is now simply a white blank form with no progress information shown.

I am attaching 3 files than can be used by anyone who would like to correct this problem.
File 1 which is the new program file is "WaterTech Report Tool Vers 5.  The code module in question is "NewProgram_Import_All_Files"
Files 2 & 3: "Bar S Foods-2" and "Bar S Foods-2-1" are 2 files that would be updated via this code module.  Copy these 2 files to a Folder on your PC.  The program steps you through selecting these files.

For any seasoned programmer that attempts to help me I ask that you forgive my "Novice" mistakes.  This was a first effort at programming in VBA.  While my approach may leave you snickering at my less …
0
Hello,
I had/have Eclipse Neon 2 installed.  I then "had" to install IntelliJ.  When I installed IntelliJ I gave it a separate workspace path.
I installed IntelliJ because I want to learn it, yet at the moment I need to do my work on Eclipse Neon2.
It appears that Intellij has invaded the workspace of Eclipse Neon2.
I do not want to uninstall IntelliJ.  So what might be an easy fix?
Or do I need to uninstall IntelliJ?
0
Hello All,

I have to look and work with multiple folders at the same time. Q-DIR  helped a ton. I wish there was a 5 folder view by some other app??

Q-DIR goes up to 4 folder view. do you know any other PC app that can have 5 folder view, at the same time?

tHank you
0
Found a memory leak when I delete a ChunkArray.   But I'm not sure how to fix it.  How to a deallocate or recover the memory used in "buffer" ?

class Chunk : public CObject
{
public:
      DECLARE_SERIAL(Chunk);
      void Serialize(CArchive& ar);

      Chunk()
      {
            used = 0;
      }

      ~Chunk()   // 8.0.24
      {
            // How to clean buffer?  
      }

         BYTE buffer[0x2000];  // 8KB
      int used;             // How many bytes of "buffer" are used
};

// Define an Array type for Chunk
typedef CArray<Chunk*, Chunk*> ChunkArray;
0
PLSQL

Write a function, which removes all repetitions of characters from a string, the string should be entered by the user.

ex: "week"
output: "wek"

(Use IN OUT option)
0
Hi

It's so annoying if I have to drive to W.Fargo to ask for my checking balance, or send money to people.

I'm concerned that hackers can enter online banking and wreak havoc.

Is this a valid concern?

Is online banking solid?

Thanks
0
I have a client who has created a system of Excel workbooks (Windows 10, I believe Excel is 2013) that are critical to his company.  There is a master workbook with material costs and there are individual workbooks for each client that specify the custom details of their product.  The customer sheet pulls pricing information from the master workbook.

The client has these files located on his local computer (in a folder from the root, not through \users).  I strongly suggested that we move the files to the server so that it gets backed up regularly and that others can access them.  I tried to do this and ran into a couple of issues.

The first issue is that when I opened a customer workbook, it indicated that the link to the source had failed.  That made sense as it was no longer on C:. I did a few clicks and was able to link it to the new location on the server.  That wasn't too difficult.

The second customer workbook had an additional problem because some of the worksheets within it were protected.  I had to manually un-protect each one, then re-establish the link, then re-protect the worksheets.  Fairly straightforward and it worked well.

The problem is that the client has about 600 of the customer workbooks and isn't very excited about having to make these one-time changes to every one.  I'm looking for suggestions here as to how I can simplify the process.

My first thought was to write VBA code that would identify which sheets are protected, un-protect them,…
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I have been using VBA for some years and have many, increasingly complex applications. I am at a point now where I am spending large amounts of time trying to debug my applications. Procedures which have worked successfully in the past are not working now. I suspect it is to do with the use of events and turning events on and off. But I also use a lot of code tracking procedures and I protect my worksheets. I think that my solution requires me to choose a method of showing my programme flow more visually and to use a diagramming methodology for doing this. I wonder whether I should invest my time in converting my applications to object-based methodologies using classes, and move to UML diagramming. I would greatly value advice on this matter. I attach an application that is confounding me at present. Many thanks for any assistance you can provide.
2017-03-24_SEBIS-Cash-Book_Developm.xlsm
0
Hello,

Is there a way to hide the file extensions in Notepad++ tabs?

Thanks
0
Hello

I am reading about Pub/Sub but trying to understand where it would be used.

https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern

The article talks about messaging but i'm trying to understand in what context. Could this be for, like a database feed, for example? That is, instead of sending database data to a specific location we provide a view to whoever wants to see?
0
Hey All,

Would you recommend the best IDE for Python code development? I like to have a dark background with multiple colored code lines... Further, I would be using pandas later on, for advanced coding.

Please recommend a list of best IDEs you think, is best for python.

Thank you
0
Hello all,

Is there an up-to-date Linux distribution that is pre-configured and geared towards Children (age 9).

What I mean is that ideally, I would like a distribution that includes:
- Simplified menu of kids apps (locked)
- Built-in Web restrictions filter
- Kid friendly email app
- Some kid friendly programming tools.
- Ideally suited to young girls.
- etc.

My options so far...
  • Older distribution (last update about 2 years ago) - Like http://www.edubuntu.org/ - I've already installed this but it loads up like a regular Ubuntu interface... no simplified menu.
  • Chrome OS Linux distribution. At least, this is a simplified UI and there are plenty of Chrome apps such as WebFilter Pro.

Thank you
0
In Git I saw this lambda expression used in this object, which I assume sets the value to false.

The file type is:
GetDocument.ashx.cs


+    public class GetDocument : IHttpHandler
+    {
+        public bool IsReusable => false;


Why?
0

R

78

Solutions

5

Articles & Videos

205

Contributors

R is a programming language and environment used primarily for statistical data analysis.

Top Experts In
R
<
Monthly
>